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

13 Коммитов

Автор SHA1 Сообщение Дата
nobu 007b7fcdcf * lib/time.rb (Time#xmlschema): use strftime specifiers instead of
fractional exponential calcuation which yields undesirable
  result.  [ruby-core:42997][Bug #6100]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-28 08:16:03 +00:00
naruse 4eb497d90b * lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
Reported by Christopher Eberz. [ruby-core:39903] Bug #5399

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 07:37:11 +00:00
yugui 8fa30bbd48 * strftime.c (rb_strftime_with_timespec): improved style consistency.
constified some variables.

* test/test_time.rb (TestTime#test_huge_precision): test for #4456.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 03:59:36 +00:00
akr 90b1eb1317 add an assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24 13:37:58 +00:00
akr 54370de9f4 * strftime.c: %Y format a year with 4 digits at least.
* lib/time.rb: format a year with 4 digits at least.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-24 11:34:45 +00:00
nobu 762fec4946 * time.c (rb_gmtime, rb_localtime): gmtime and localtime return
NULL on error.  [ruby-core:23551]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25 18:41:32 +00:00
akr cef83891ca * test/test_time.rb: make tests timezone independent.
reported by zunda.  [ruby-dev:38492] 



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-18 22:53:05 +00:00
akr d9dd33fc27 * lib/time.rb (Time#rfc2822): pad leading zeros for year.
(Time#httpdate): ditto.
  (Time#xmlschema): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 18:08:47 +00:00
akr fd9bfef325 * lib/time.rb (Time#xmlschema): use subsec instead of nsec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21 17:11:27 +00:00
akr 1b4c1f715e * lib/time.rb (Time.parse): raise ArgumentError if Date._parse don't
extract date information.  [ruby-core:20912]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14 22:03:28 +00:00
akr 5b512b7fa9 * test/test_time.rb: extracted from lib/time.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14 11:19:52 +00:00
nahi 45c950c1df * test/test_*.rb: Pathname#parent -> Pathname#dirname.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-13 04:06:31 +00:00
nahi 79c0e644a1 * test/inlinetest.rb, test/{test_generator.rb,test_ipaddr.rb,
test_pathname.rb,test_pp.rb,test_prettyprint.rb,test_set.rb,
          test_time.rb,test_tsort.rb: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-06 02:34:24 +00:00