mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* 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
This commit is contained in:
parent
578fc84000
commit
1fd1e0ac04
5 changed files with 954 additions and 5 deletions
|
@ -379,5 +379,9 @@ class TestTime < Test::Unit::TestCase
|
|||
assert_equal("foo" * 1000, T2000.strftime("foo" * 1000))
|
||||
|
||||
assert_equal("Sat", Time.at(946684800).strftime("%a"))
|
||||
|
||||
t = Time.at(946684800, 123456.789)
|
||||
assert_equal("123", t.strftime("%L"))
|
||||
assert_equal("123456789", t.strftime("%N"))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue