summaryrefslogtreecommitdiff
path: root/ext/date
AgeCommit message (Collapse)Author
2019-04-09date: support for Reiwa, new Japanese eranobu
[Feature #15742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-09date_core.c: [DOC] Heisei will be assumed if no-era [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-03date: make zone a substring to copy encoding and taintednessnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02date_parse.c: name JISX0301_DEFAULT_ERAnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02date_parse.c: renamed JAPANESE prefix as JISX0301nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-02date: use del_hash to extract an element destructivelynobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01date_parse.c: removed 'r' which is not in JIS X 0301 yetnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-01date_parse.c: extract Japanese era initialsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08Removed moving toplevel header since r12501nobu
Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-07Bump version to date-2.0.0.hsbt
I forgot to change it when Ruby 2.6.0 was released. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-13Separate RSTRING_PTR from a function callnobu
Do not apply RSTRING_PTR, a macro which evaluats its argument multiple times, on a function call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-12Revise Date#hour, #min, #secnobu
For ActiveSupport. [ruby-core:90443] [Bug #15403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11ext/date: Fix !NDEBUG codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11date_core.c: moved some methods to DateTimenobu
* ext/date/date_core.c (Init_date_core): moved methods which make sense only for DateTime to that class, instead of defining private methods in Date and making them public in DateTime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-11date_core.c: reorder ComplexDateDatanobu
* ext/date/date_core.c (ComplexDateData): reordered to adjust common part with SimpleDateData. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13date_core.c: use static ID variablesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13date_core.c: obey to the allocation frameworknobu
* ext/date/date_core.c (date_initialize): separate from date_s_civil and obey the allocation framework. * ext/date/date_core.c (datetime_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13date_core.c: respect COMPLEX_DAT bitnobu
* ext/date/date_core.c (d_lite_marshal_load): respect COMPLEX_DAT bit in the pre-allocated structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13date_core.c: keep COMPLEX_DAT bitnobu
* ext/date/date_core.c (d_lite_initialize_copy): do not change COMPLEX_DAT bit, as the structure does not change. initialize member-wise instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13date_core.c: set/reset COMPLEX_DATnobu
* ext/date/date_core.c (set_to_simple, set_to_complex): always set/reset COMPLEX_DAT bit, which is very tightly bound to the structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01RSTRING_PTR may not be terminated in the futurenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-0110**3 is always 1000nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-01surround macro block with do/whilenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-31[DOC] leap seconds [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07Removed needless date attribute from gemspec of default gems.hsbt
They are assigned automatically when pushing gem file to rubygems.org. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09Removed useless assertions [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07date_core.c: check conversionnobu
* ext/date/date_core.c (offset_to_sec, d_lite_plus): check conversion results, to get rid of infinite recursion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25date_parse.c, date_strptime.c: ensure symbols static allnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25date_core.c: ensure symbols static allnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-25date_core.c: defensive codenobu
* ext/date/date_core.c (f_cmp): check comparison failure. * ext/date/date_core.c (d_lite_step): deal with the comparison result more defensively. [ruby-core:85796] [Bug #14549] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-11Bump version to date-1.0.0 as default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08support gperf 3.1nobu
* tool/gperf.sed: extracted sed commands to a script. ANSI-C code produced by gperf 3.1 declares length arguments as `size_t`. it causes conflict with existing declarations, and needs casts for a local variable and return statements. [Feature #13883] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-17ext/date/extconf.rb: check for timezone and altzonerhe
Instead of in configure.in. As of r28592 the HAVE_VAR_TIMEZONE and HAVE_VAR_ALTZONE macros are only used by ext/date. ext/date doesn't care whether they are int or long, so just check for the existence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-07ruby.h: unnormalized Fixnum valuenobu
* include/ruby/ruby.h (ST2FIX): fix unnormalized Fixnum value bug on mingw/mswin. [ruby-core:82687] [Bug #13877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-14Update gemspec for standalone gem that is ruby/date repository.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-19Make string literal to frozen object on gemspec of defulte gems.hsbt
Added following gemspecs. * extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib * pure ruby libraries: cmath, csv, fileutils, scanf, webrick psych and rdoc is out of scope of this commit. I will merge after upstream was change to `frozen_string_literal: true`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09date_core.c: fix docs for %Z formatstomar
* ext/date/date_core.c: [DOC] fix documentation for %Z format of {Date,DateTime}.strftime. Reported by Damon Timm. Based on a patch by nano. [ruby-core:79602] [Bug #13231] [Fix GH-1565] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22ruby tool/update-deps --fixshyouhei
Onigumo 6 (r57045) introduced new onigumo.h header file, which is required from quite much everywhere. This commit adds necessary dependencies. Note: ruby/oniguruma.h now includes onigumo.h, ruby/io.h includes oniguruma.h, ruby/encoding.h also includes oniguruma.h, and internal.h includes encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-19date_core.c: fix error in DateTime docsstomar
* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339. Reported by Andreas Rayo Kniep. [ruby-core:68418] [Bug #10936] * ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and DateTime#xmlschema; other small improvements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27date_core.c: expand docs for Date shiftingstomar
* ext/date/date_core.c: [DOC] expand docs for Date shifting * add examples for Date#>> and Date#<< that clarify some edge cases * add examples for Date#next_year and Date#prev_year * add cross references to Date#>> and Date#<< [ruby-core:79584] [Bug #13225] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07Fix a required ruby version on gemspec of gemified libraries.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-06date_core.c: [DOC] revise docs [ci skip]nobu
* fix malformed rdoc for Date#today, Date._strptime, and DateTime._strptime * add code examples for Date#<< and Date#>> to demonstrate that different dates can result in the same return value * use Date::ITALY in call-seq instead of only ITALY * fix some copy/paste mistakes where Date should be DateTime * fix various errors and grammar * fix cross references and formatting [ruby-core:79433] [Bug #13193] Author: Marcus Stollsteimer <sto.mar@web.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02Added initial gemspec for Date module.hsbt
[Feature #13183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27{ext,test}/date: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-29parse.y: ambiguous parenthesesnobu
* parse.y (parser_yylex): warn ambiguous parentheses after a space in method definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01* ext/date/date_parse.c (date_zone_to_diff): it's nonsence and reallyusa
harm that to use unary minus operator with unsigned value. get rid of test failures introduced at r56312. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e