diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-29 14:47:04 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-29 14:47:04 +0000 |
commit | 23658b355c1c62771945cfa86e098ba8dd618779 (patch) | |
tree | 5f996bbb4f88675e72195fe674c4527a9149340d /test/date/test_date_strftime.rb | |
parent | 64263ddeb6b925866bc4ad2d5c74300af178b896 (diff) | |
download | ruby-23658b355c1c62771945cfa86e098ba8dd618779.tar.gz |
* ext/date/date_core.c: avoided using timev.
* ext/date/date_strftime.c: ditto.
* ext/date/date_tmx.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date/test_date_strftime.rb')
-rw-r--r-- | test/date/test_date_strftime.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/date/test_date_strftime.rb b/test/date/test_date_strftime.rb index 61a82a17f5..8b96f16049 100644 --- a/test/date/test_date_strftime.rb +++ b/test/date/test_date_strftime.rb @@ -194,6 +194,15 @@ class TestDateStrftime < Test::Unit::TestCase end end + def test_strftime_milli + s = '1970-01-01T00:00:00.123456789' + d = DateTime.parse(s) + assert_equal('123', d.strftime('%Q')) + s = '1970-01-02T02:03:04.123456789' + d = DateTime.parse(s) + assert_equal('93784123', d.strftime('%Q')) + end + def test_strftime__minus d = DateTime.new(1969, 12, 31, 23, 59, 59) assert_equal('-1', d.strftime('%s')) |