Date.jd について

[email protected]$G$9(B

ruby 1.9.3 $B$N(B Date.jd jd()$B$K(B Float $BCM$d(B Rational
$BCM$rEO$9$H$*$+$7$J7k2L(B
$B$K$J$j$^$9!#$3$l$O2?$+0U?^$,$"$k$N$G$7$g$&$+(B?

$ ruby -v -rdate -e ‘p Date.jd(Date.new(2011,12,20).jd)’
ruby 1.9.3p6 (2011-12-15 revision 34066) [i686-linux]
#<Date: 2011-12-20 ((2455916j,0s,0n),+0s,2299161j)>

$ ruby -rdate -e ‘p Date.jd(Date.new(2011,12,20).jd.to_f)’
#<Date: 188832-12-14 ((70690880j,0s,0n),+0s,2299161j)>

$ ruby -rdate -e ‘p Date.jd(Rational(Date.new(2011,12,20).jd))’
#<Date: 220844-07-14 ((82382870j,0s,0n),+0s,2299161j)>

[email protected]$G$9(B

Tadayoshi F. [email protected] writes:

ruby 1.9.3 $B$N(B Date.jd jd()$B$K(B Float $BCM$d(B Rational
$BCM$rEO$9$H$*$+$7$J7k2L(B

$B$K$J$j$^$9!#$3$l$O2?$+0U?^$,$"$k$N$G$7$g$&$+(B?

$B%P%0$G$7$g$&!#(B

trunk $B$GD>$C$F$$$k$N$r3NG’$7$^$7$?!#$I$&$b$"$j$,$H$&$4$6$$$^$9!#(B

ruby 1.9.3 $B$N(B Date.jd jd()$B$K(B Float $BCM$d(B Rational
$BCM$rEO$9$H$*$+$7$J7k2L(B
$B$K$J$j$^$9!#$3$l$O2?$+0U?^$,$"$k$N$G$7$g$&$+(B?

$B%P%0$G$7$g$&!#(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs