diff options
| author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 12:30:58 +0000 |
|---|---|---|
| committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 12:30:58 +0000 |
| commit | caed7c21343726cb8e4c01b576acb116ef137c12 (patch) | |
| tree | 07ec76d65b0cd389c17d7381bac1a4aadc45316a /lib | |
| parent | cefe37042801614256515aecd2199de4f9a2b7ce (diff) | |
| download | ruby-caed7c21343726cb8e4c01b576acb116ef137c12.tar.gz ruby-caed7c21343726cb8e4c01b576acb116ef137c12.tar.xz ruby-caed7c21343726cb8e4c01b576acb116ef137c12.zip | |
fixed an issue about mathn.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/date.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/date.rb b/lib/date.rb index c2070760a..8639b3157 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -1,7 +1,7 @@ # # date.rb - date and time library # -# Author: Tadayoshi Funaba 1998-2005 +# Author: Tadayoshi Funaba 1998-2006 # # Documentation: William Webber <william@williamwebber.com> # @@ -370,7 +370,7 @@ class Date ns = ns?(jd, sg) a = jd_to_civil(jd - 3, ns)[0] y = if jd >= commercial_to_jd(a + 1, 1, 1, ns) then a + 1 else a end - w = 1 + (jd - commercial_to_jd(y, 1, 1, ns)) / 7 + w = 1 + ((jd - commercial_to_jd(y, 1, 1, ns)) / 7).floor d = (jd + 1) % 7 if d.zero? then d = 7 end return y, w, d |
