Sha256: 0f5332766900d5a654cbd2f0ecf20eb7e3196fcc128d1b0fe992b3dc17761a7c
Contents?: true
Size: 422 Bytes
Versions: 1
Compression:
Stored size: 422 Bytes
Contents
require 'facets/string/to_time' require 'test/unit' class TestStringToTime < Test::Unit::TestCase def test_to_date s = "2005-10-31" d = s.to_date assert_equal( 31, d.day ) assert_equal( 10, d.month ) assert_equal( 2005, d.year ) end def test_to_time s = "2:31:15 PM" t = s.to_time assert_equal( 14, t.hour ) assert_equal( 31, t.min ) assert_equal( 15, t.sec ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-2.4.0 | test/string/test_to_time.rb |