summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_time.rb
Commit message (Collapse)AuthorAgeFilesLines
* add tests.akr2009-12-251-0/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2009-12-221-0/+16
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* don't use a string for Time.at argument.akr2009-07-021-15/+15
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test.akr2009-05-121-0/+15
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_arg): use the year argument as-is. [ruby-dev:38194]akr2009-04-211-2/+0
| | | | | | | | * lib/time.rb (Time.parse): interpret small year 0..99 as 1950..2049. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: remove time_t restriction from Time class.akr2009-04-211-20/+42
| | | | | | | | | | | | | | * timev.h: new file to define struct vtm. * strftime.c: format struct vtm instead of struct tm. * ext/syck/rubyext.c (mktime_do): don't use time_t; [ruby-dev:38191] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_cmp): negate the result of reverse comparison.akr2009-03-261-0/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): use locale insensitive functions for tr_TRakr2008-12-231-0/+1
| | | | | | | locale. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): The # flag should work with %a, %A, %b,shugo2008-11-241-0/+7
| | | | | | | | %B, and %h. [ruby-dev:37162] * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): A width specifier for %t and %n shouldshugo2008-11-241-0/+12
| | | | | | | | work. [ruby-dev:37160] * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): The precision of %0N should be 9.shugo2008-11-241-1/+1
| | | | | | | [ruby-dev:37156] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): The default precision should be 1, notshugo2008-11-241-0/+5
| | | | | | | | 0. [ruby-dev:37155] * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported %s and %P.shugo2008-08-281-0/+10
| | | | | | | | * time.c (time_strftime): ditto. * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): fixed a bug of padding.shugo2008-08-281-0/+33
| | | | | | | * test/ruby/test_time.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") shouldshugo2008-08-281-0/+1
| | | | | | | return "0", not "". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb: suppress warning during test.mame2008-08-281-0/+9
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb (test_strftime): make test for %a independentmame2008-08-281-1/+2
| | | | | | | from local timezone. [ruby-dev:35992] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported flags and precision for mostnobu2008-08-221-7/+2
| | | | | | | | | | conversions. [ruby-dev:35906] * lib/date/format.rb (Date#strftime): left-justifies %L and %N. [ruby-dev:35909] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported %F and %<precision>N.shugo2008-08-211-0/+12
| | | | | | | | | | reverted config.h to ruby.h for Windows. * test/ruby/test_time.rb (TestTime::test_strftime): added tests for %F and %N. * time.c: documented %F and %N. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): return "UTC" instead of "GMT".shugo2008-08-211-1/+1
| | | | | | | * test/ruby/test_time.rb (test_strftime): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: new file.shugo2008-08-201-0/+4
| | | | | | | | | | * common.mk (COMMONOBJS): added strftime.$(OBJEXT). * time.c (time_strftime): do not use strftime(3). supported %L(millisecond) and %N(nanosecond). * test/ruby/test_time.rb: added tests for %L and %N. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb (TestTime#test_time_interval): add timeoutkazu2008-07-141-1/+6
| | | | | | | to avoid stopping tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: fix rounding negative float.akr2008-06-271-0/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (obj2nsec): fix string argument.akr2008-05-041-0/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb (test_readers): fix typo.naruse2008-02-281-1/+2
| | | | | | (test_strftime): "UTC" is also ok for time.gmtime.strftime("%Z"). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_pack.rb: fix tests for 64bit CPU.mame2008-02-101-7/+15
| | | | | | | | | | | | | | | | | * test/ruby/test_bignum.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_integer.rb: ditto. * test/ruby/test_time.rb: ditto. * test/ruby/test_numeric.rb: ditto. * test/ruby/test_fixnum.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_hash.rb: follow the change of Hash#flatten.mame2008-02-071-0/+203
| | | | | | | | | | | * test/ruby/test_time.rb: add tests to achieve over 70% test coverage of time.c. * test/ruby/test_prec.rb: ditto over 90% for prec.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: check struct timespec, clock_gettime, utimensat,akr2007-11-191-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct stat.st_atim, struct stat.st_atimespec, struct stat.st_atimensec, struct stat.st_mtim, struct stat.st_mtimespec, struct stat.st_mtimensec, struct stat.st_ctim, struct stat.st_ctimespec, struct stat.st_ctimensec. * include/ruby/missing.h: provide struct timespec if not available. * time.c: support nanosecond-resolution using struct timespec. * include/ruby/intern.h: provide rb_time_nano_new. * file.c (utime_internal): use utimensat if available. (rb_file_s_utime): refactored. (rb_f_test): use stat_atime, stat_mtime, stat_ctime. (rb_stat_cmp): check tv_nsec. (stat_atimespec): new function. (stat_atime): ditto. (stat_mtimespec): ditto. (stat_mtime): ditto. (stat_ctimespec): ditto. (stat_ctime): ditto. (rb_stat_atime): use stat_atime. (rb_file_s_atime): ditto. (rb_file_atime): ditto. (rb_stat_mtime): use stat_mtime. (rb_file_s_mtime): ditto. (rb_file_mtime): ditto. (rb_file_ctime): use stat_ctime. (rb_file_s_ctime): ditto. (rb_stat_ctime): ditto. * variable.c (rb_copy_generic_ivar): clear clone's instance variables if obj has no instance variable. * marshal.c (w_object): dump instance variables of generated string for TYPE_USERDEF, even if original object has instance variables. * lib/time.rb (Time#xmlschema): use nsec instead of usec. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (time_minus): fix Time.at(2**60+1) - Time.at(2**60).akr2007-11-181-0/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use ML ref. for assertion message.akr2007-11-181-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add an assertion.akr2004-06-251-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add 2 assertions.akr2004-03-311-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test. [ruby-dev:22619]akr2004-03-311-4/+14
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* more tests for Time.utc.akr2004-03-311-5/+29
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for minimum 32bit signed time_t for Time.utc.akr2004-03-301-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (search_time_t): limit guess range by mktime if it isakr2004-03-301-0/+10
| | | | | | | availabe. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb: added tests for [ruby-dev:22614] andakira2004-01-191-0/+2
| | | | | | | [ruby-dev:22617]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_time.rb: new test case to test Time#[+-].siena2004-01-181-0/+24
* time.c (time_plus, time_minus): fix RangeError for a negative argument in environments whose time_t is unsigned. [ruby-dev:22608] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e