DateTime already have fraction of a day.
$B5DO@$NH>J,0J2<$7$+$o$+$i$J$$$G$9$,!"$3$l$O(B
The newer version of DateTime does not allow to add hours/minutes to DateTime
objects which already have a fraction of a day.
$B$N0UL#$G$7$g$&$+!#(B
Perhaps, this is not the case.
The discussion is on arguments of jd; that is$B!"(B
how to specify the time at initialization and not
whether addition to the object is allowed or not.
jd$B$N$[$&$O(B
jd(jd=0, h=0, min=0, s=0, of=0, sg=ITALY)
$B$H$$$&$3$H$K$J$C$F$$$k$N$G!"(B
DateTime.jd(Rational(39014323, 16), 0)
$B$H(B
DateTime.jd(Rational(39014323, 16))
$B$,F1$8$G$J$$$H$$$&$N$O<c43M=A[$K2q$o$J$$OC$G!"(B
non 0$B$J(Bh, min, …$B$r;XDj$7$?$H$-$@$1%(%i!<$K(B
$B$9$k$H$$$&9M$(J}$b$"$k$s$8$c$J$$$+$H;W$$$^$9!#(B
The initial bug report was on the difference of
DateTime.jd(Rational(39014323, 16), 0)
and
DateTime.jd(Rational(39014323, 16))
Because jd is documented as
jd(jd=0, h=0, min=0, s=0, of=0, sg=ITALY)
The difference does not meet to the expectation.
Perhaps, it might be meaningful to raise error
only if non-0 h, min etc is specified along with
fraction date.
Best regards
2011/6/7 Tadayoshi F. [email protected]:
$B26$b(B rails $B$OEvLL%j%j!<%9$5$l$J$$!"$H?.$8$F$*$-$^$9!#(B
$B;d$,:G=i!"$H#22sL$N%a!<%k$G!X%j%j!<%9!Y$H$$$C$?$N$O(Bruby
1.9.3$B$N;v$G$9!#(B
$B$^$D$b$H(B $B$f$-$R$m$G$9(B
In message “Re: [ruby-dev:43668] Re: DateTime.new! and DateTime.jd”
on Wed, 8 Jun 2011 10:03:27 +0900, “Martin J. D$(D+d(Brst”
[email protected] writes:
|> [En]
|> The newser version of DateTime checks adding hour|minute to
|> DateTime already have fraction of a day.
|
|$B5DO@$NH>J,0J2<$7$+$o$+$i$J$$$G$9$,!"$3$l$O(B
|
|The newer version of DateTime does not allow to add hours/minutes to
|DateTime objects which already have a fraction of a day.
|
|$B$N0UL#$G$7$g$&$+!#(B
$BE::o$7$F$$$?$@$$$F$"$j$,$H$&$4$6$$$^$9!#$=$N$h$&$J0UL#$N$D$b(B
$B$j$G$7$?!#(B
2011/6/7 Yukihiro M. [email protected]:
$B$7$F$$$k$J$i$P!"$I$A$i$b%P%0$G$O$J$/!“K\Mh$N;EMM$r30$l$?;H$$(B
|$B%3%_%C%H%a%C%;!<%8(B(r31862 and
r31668)$B!!$K$b!V5!G=$N:o=|!W$K4X$7$F5-$5$l$F$$$^$;$s$G$7$?!#(B
$B$k$+65$($F$$$?$@$1$^$;$s$+!)(B
$B;d$,8+$D$1$?8B$j$G$O!”(Btzinfo $B$H(B
TZInfo::TimezoneTransitionInfo#at $B$H(B
RubyCoreSupport.datetime_new!$B$NCf$G$7$?!#(B
TZinfo$B$N%3!<%I$rFI$s$G$bM}2r=PMh$^$;$s$G$7$?!#$9$$$^$;$s!#$7$+$7(B
[ruby-core:36444] $B$KJs9p$7$^$7$?!#(B
[En]
That means some gems appear to rely on date’s internal API
or undefined behavior, so that there might not be easy
“replacement”. But we’d like to help. Could you tell me
what gems cause what kind of problem, preferably in detail,
instead of reporting bugs in date library?
[En]
The only place I’ve found it is in tzinfo’s
TZInfo::TimezoneTransitionInfo#at and RubyCoreSupport.datetime_new!.
I don’t really understand the tzinfo code. I’m sorry. 
Please also see [ruby-core:36444].
$B$^$D$b$H(B $B$f$-$R$m$G$9(B
In message “Re: [ruby-dev:43670] Re: DateTime.new! and DateTime.jd”
on Wed, 8 Jun 2011 10:33:58 +0900, Tomoaki NISHIYAMA
[email protected] writes:
|jd$B$N$[$&$O(B
|jd(jd=0, h=0, min=0, s=0, of=0, sg=ITALY)
|$B$H$$$&$3$H$K$J$C$F$$$k$N$G!“(B
|
|DateTime.jd(Rational(39014323, 16), 0)
|$B$H(B
|DateTime.jd(Rational(39014323, 16))
|$B$,F1$8$G$J$$$H$$$&$N$O<c43M=A[$K2q$o$J$$OC$G!”(B
|non 0$B$J(Bh, min, …$B$r;XDj$7$?$H$-$@$1%(%i!<$K(B
|$B$9$k$H$$$&9M$(J}$b$"$k$s$8$c$J$$$+$H;W$$$^$9!#(B
$B$3$l$b$R$H$D$N9M$(J}$G$O$“$j$^$9!#$9$G$K8x$K$J$C$F$$$k(Bjd$B$N%I(B
$B%-%e%a%s%H$+$iM=A[$5$l$kF0:n$KH?$7$F$$$k$H$$$&E@$G$O!”$U$J$P(B
$B$5$s$,G<F@$7$F$/$@$5$k2DG=@-$O$“$j$^$9$,!”$I$&$J$s$G$7$g$&$M!#(B