Граф коммитов

72 Коммитов

Автор SHA1 Сообщение Дата
matz a689e57283 * strftime.c (rb_strftime): "%^P" should convert to upper case.
[ruby-dev:37180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 04:42:11 +00:00
matz 15b183c218 * strftime.c (FMT): use "%0d" formatter for zero padding, not "%.d".
[ruby-dev:37168]  fix: #768

* strftime.c (rb_strftime): %s to use zero padding by default.
  [ruby-dev:37180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 00:24:01 +00:00
shugo 361a713f96 * strftime.c (rb_strftime): The # flag should work with %a, %A, %b,
%B, and %h.  [ruby-dev:37162]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:29:37 +00:00
shugo bf1d53e2e0 * strftime.c (rb_strftime): A width specifier for %t and %n should
work.  [ruby-dev:37160]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:01:47 +00:00
shugo aa498028b2 * strftime.c (rb_strftime): The precision of %0N should be 9.
[ruby-dev:37156]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 13:10:07 +00:00
shugo 32aed81046 * strftime.c (rb_strftime): The default precision should be 1, not
0.  [ruby-dev:37155]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 12:42:45 +00:00
nobu 893af1e3b6 * strftime.c (rb_strftime): suppressed warnings on cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-12 00:46:59 +00:00
yugui a8c3540b32 * dln.c: Ruby no longer supports Windows CE.
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:48:20 +00:00
yugui ae7ea3332b * dln.c: Ruby no longer supports MS-DOS.
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00
usa d4c5212794 * strftime.c (rb_strftime): calc timezone offset by myself if system
doesn't provide timezone info.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 17:58:13 +00:00
shugo 63846d48a9 * strftime.c (rb_strftime): supported %s and %P.
* time.c (time_strftime): ditto.
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 17:06:20 +00:00
shugo 77d7a80f97 * strftime.c (rb_strftime): fixed a bug of padding.
* test/ruby/test_time.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 15:54:44 +00:00
shugo 6a7481c38d * strftime.c (rb_strftime): Time.mktime(2000).strftime("%-S") should
return "0", not "".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 15:01:07 +00:00
nobu e6770d9407 * strftime.c (daylight, timezone): not provied as dllexport on cygwin,
right now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23 23:03:44 +00:00
nobu 5378f8e5b1 * strftime.c (rb_strftime): support more flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23 08:06:59 +00:00
nobu ce2b7d3a58 * strftime.c (rb_strftime): supported flags and precision for most
conversions.  [ruby-dev:35906]

* lib/date/format.rb (Date#strftime): left-justifies %L and %N.
  [ruby-dev:35909]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 05:28:08 +00:00
shugo a0cc5b19b7 * strftime.c (rb_strftime): supported %F and %<precision>N.
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 14:57:35 +00:00
shugo a0e3fe5d7c * strftime.c: include ruby/config.h instead of ruby/ruby.h.
* common.mk: removed the old rule for missing/strftime.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 05:28:25 +00:00
shugo 9b4d4a8a48 * strftime.c (rb_strftime): return "UTC" instead of "GMT".
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 00:30:28 +00:00
shugo 65337c5b2d * configure.in: always check timezone().
* strftime.c (rb_strftime): prefer timezone/altzone rather than
  gettimeofday().  The second argument to gettimeofday() is ignored
  on Solaris.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20 17:08:36 +00:00
usa 22c4bdcd18 * strftime.c: win32 support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20 15:50:21 +00:00
shugo 1fd1e0ac04 * strftime.c: new file.
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@18731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-20 15:30:28 +00:00