summaryrefslogtreecommitdiff
path: root/ext/date
AgeCommit message (Collapse)Author
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
2016-10-01date_parse.c: str_end_withnobu
* ext/date/date_parse.c (str_end_with): extract to tell if a string ends with the other string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01zonetab.h: use strncmpnobu
* ext/date/zonetab.h (zonetab): use strncmp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-01date_parse.c: refactornobu
* ext/date/date_parse.c (date_zone_to_diff): refactor without allocating strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06Update dependenciesnobu
* common.mk (compile.o, loadpath.o): update dependencies. * common.mk (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-15date_core.c: remove assertnobu
* ext/date/date_core.c (decode_jd): do not assert type of argument. just try to convert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-15date_core.c: missing argumentnobu
* ext/date/date_core.c (d_lite_initialize): fix missing argument for write-barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-14date_strftime.c: check precisionnobu
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too large precision to get rid of buffer overflow. reported by Guido Vranken <guido AT guidovranken.nl>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-08suppress static-in-inline warningnobu
* ext/date/zonetab.list (zonetab): forward declaration as static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-08fix date buildnobu
* common.mk (zonetabl.h): fix typo. * ext/date/zonetab.list: remove forward declaration which may be conflict with the later definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-08ext/date/zonetab.list: gperf timezone namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-08ext/date: constifynobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20fix typos [ci skip]kazu
* ext/date/date_core.c: [DOC] fix typos. [fix GH-1360] patched by @soundasleep git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-18ruby.h: RB_INTEGER_TYPE_Pnobu
* include/ruby/ruby.h (RB_INTEGER_TYPE_P): new macro and underlying inline function to check if the object is an Integer (Fixnum or Bignum). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-23date_core.c: [DOC] markdown to rdoc [ci skip]nobu
* ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime documentation to RDoc from Markdown. [ruby-core:75136] [Bug #12311] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-16* ext/date/date_core.c : remove not used f_getlocal macro.yui-knk
After r54553 f_getlocal macro is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-16* ext/date/date_core.c : remove not used f_utc6 macro.yui-knk
After r54169 f_utc6 macro is not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-12date_core.c: preserve timezonenobu
* ext/date/date_core.c (time_to_time): should preserve timezone info. [ruby-core:74889] [Bug #12271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-31date_core.c: fix indentnobu
* ext/date/date_core.c (d_lite_strftime, dt_lite_strftime): [DOC] fix indent not to be a big sole verbatim. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-31date_core.c: fix DateTime rdocnobu
* ext/date/date_core.c (Init_date_core): [DOC] fix misplaced doc of DateTime. [ruby-core:74729] [Bug #12233] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24date_core.c: unused variablenobu
* ext/date/date_core.c (dt_lite_jisx0301): remove no longer used variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24date_core.c: append stringsnobu
* ext/date/date_core.c (dt_lite_iso8601): strftimev() always returns a String, so append them directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24date_core.c: fix jisx0301 and iso8601nobu
* ext/date/date_core.c (d_lite_jisx0301, iso8601_timediv), (dt_lite_jisx0301): format by the format string in local buffer to prevent intermediate strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24date_core.c: fix inspectnobu
* ext/date/date_core.c (mk_inspect_raw, mk_inspect): inspect by "%+"PRIsVALUE, to prevent intermediate strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-18* ext/date/date_core.c (datetime_to_time): preserve timezone infosonots
[Bug #12189] [Fix GH-1295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08date_core.c: missing argument checknobu
* ext/date/date_core.c (d_lite_lshift): should check the argument before negation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08suppress warningsnobu
* ext/date/date_parse.c (date_zone_to_diff): suppress parentheses warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05ext: use RARRAY_AREFnobu
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e