diff options
| author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 05:05:18 +0000 |
|---|---|---|
| committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 05:05:18 +0000 |
| commit | b9b2c6c2e88ddffc85d6629cebf446b9a2f3ec82 (patch) | |
| tree | 16a115443e3276f0019cf686bb97605d37a4f2c9 /lib/date.rb | |
| parent | aeb09cd29809bf03005e525595fa9760b357d78b (diff) | |
| download | ruby-b9b2c6c2e88ddffc85d6629cebf446b9a2f3ec82.tar.gz ruby-b9b2c6c2e88ddffc85d6629cebf446b9a2f3ec82.tar.xz ruby-b9b2c6c2e88ddffc85d6629cebf446b9a2f3ec82.zip | |
synchronized with date2 3.6.3
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
| -rw-r--r-- | lib/date.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/date.rb b/lib/date.rb index d67b1bab7..977182541 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -1,12 +1,12 @@ # # date.rb - date and time library # -# Author: Tadayoshi Funaba 1998-2004 +# Author: Tadayoshi Funaba 1998-2005 # # Documentation: William Webber <william@williamwebber.com> # #-- -# $Id: date.rb,v 2.14 2004-09-25 09:51:25+09 tadf Exp $ +# $Id: date.rb,v 2.15 2005-02-06 11:09:53+09 tadf Exp $ #++ # # == Overview @@ -647,7 +647,7 @@ class Date elem ||= {} y, m, d = elem.values_at(:year, :mon, :mday) if [y, m, d].include? nil - raise ArgumentError, 'invalid date' + raise ArgumentError, '3 elements of civil date are necessary' else civil(y, m, d, sg) end @@ -1203,7 +1203,7 @@ class DateTime < Date fr ||= 0 of ||= 0 if [y, m, d].include? nil - raise ArgumentError, 'invalid date' + raise ArgumentError, '3 elements of civil date are necessary' else civil(y, m, d, h, min, s, of.to_r/86400, sg) + (fr/86400) end |
