summaryrefslogtreecommitdiffstats
path: root/strftime.c
Commit message (Collapse)AuthorAgeFilesLines
* * time.c: support fixed UTC offset. [ruby-dev:38326]akr2009-05-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | (leap_year_v_p): new macro. (TIME_FIXOFF_P): new macro. (TIME_SET_FIXOFF): new macro. (time_init_0): renamed from time_init. (time_set_utc_offset): new function. (vtm_add_offset): new function. (utc_offset_arg): new function. (time_init_1): new function. (time_init): call time_init_0 or time_init_1 according argc. (validate_utc_offset): new function. (time_localtime_m): new function. (time_fixoff): new function. (time_getlocaltime): take optional UTC offset argument. (time_get_tm): support fixed UTC offset time. (Init_Time): make Time#{initialize,localtime,getlocal} varargs. * strftime.c (rb_strftime): vtm->zone can be NULL now. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (localtime_with_gmtoff): fixed cross function jump.nobu2009-04-221-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c: remove time_t restriction from Time class.akr2009-04-211-75/+169
| | | | | | | | | | | | | | * 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
* * dir.c, dln.c, parse.y, re.c, ruby.c, sprintf.c, strftime.c,nobu2009-03-171-3/+3
| | | | | | | | string.c, util.c, variable.c: use strlcpy, memcpy and snprintf instead of strcpy, strncpy and sprintf. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu2009-03-121-1/+1
| | | | | | | | | | numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): use locale insensitive functions for tr_TRakr2008-12-231-4/+4
| | | | | | | locale. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): should add padding for %%.tadf2008-11-271-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (STRFTIME): use rb_strftime() recursively, instead ofmatz2008-11-261-9/+9
| | | | | | platform's strftime(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (STRFTIME): should add padding for %[xXrR] etc.matz2008-11-251-1/+6
| | | | | | [ruby-dev:37185] fix: #792 git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): should not swallow incompletematz2008-11-251-4/+6
| | | | | | | | | formatter, e.g. "%E". [ruby-dev:37170] fix: #787 * strftime.c (rb_strftime): clear flags before processing unknown formatter, e.g. "%i". [ruby-dev:37180] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): "%^P" should convert to upper case.matz2008-11-251-1/+1
| | | | | | [ruby-dev:37180] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (FMT): use "%0d" formatter for zero padding, not "%.d".matz2008-11-251-2/+2
| | | | | | | | | [ruby-dev:37168] fix: #768 * strftime.c (rb_strftime): %s to use zero padding by default. [ruby-dev:37180] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): The # flag should work with %a, %A, %b,shugo2008-11-241-0/+16
| | | | | | | | %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-10/+13
| | | | | | | | 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-2/+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-4/+4
| | | | | | | | 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): suppressed warnings on cygwin.nobu2008-10-121-6/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c: Ruby no longer supports Windows CE.yugui2008-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/win32.h: ditto. * ruby.c: ditto. * strftime.c: ditto. * win32/Makefile.sub: ditto. * win32/win32.c: ditto. * ext/tk/extconf.rb: ditto. * lib/fileutils.rb: ditto. * test/fileutils/test_fileutils.rb: ditto. * wince/*: removed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dln.c: Ruby no longer supports MS-DOS.yugui2008-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): calc timezone offset by myself if systemusa2008-08-311-0/+9
| | | | | | | | doesn't provide timezone info. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported %s and %P.shugo2008-08-281-2/+8
| | | | | | | | * 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-1/+1
| | | | | | | * 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-1/+1
| | | | | | | return "0", not "". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (daylight, timezone): not provied as dllexport on cygwin,nobu2008-08-231-1/+1
| | | | | | | right now. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): support more flags.nobu2008-08-231-68/+114
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c (rb_strftime): supported flags and precision for mostnobu2008-08-221-134/+192
| | | | | | | | | | 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-3/+44
| | | | | | | | | | 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: include ruby/config.h instead of ruby/ruby.h.shugo2008-08-211-1/+1
| | | | | | | * common.mk: removed the old rule for missing/strftime.c. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18748 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
* * configure.in: always check timezone().shugo2008-08-201-5/+5
| | | | | | | | | * strftime.c (rb_strftime): prefer timezone/altzone rather than gettimeofday(). The second argument to gettimeofday() is ignored on Solaris. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: win32 support.usa2008-08-201-7/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * strftime.c: new file.shugo2008-08-201-0/+924
* 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