Jonathan Leffler wrote:
Or, what happens if there are 10 digits after the decimal point.
That's what the substr() is for.
Yeah, mostly academic, except I'm working towards a time type (not for
Perl per se) that extends down to picoseconds (and up to 10^12 years,
too).
At least 105 bits, then.
Zefram [EMAIL PROTECTED] wrote:
Re: Patch for DateTime::Format::W3CDTF to respekt second fragment part
Julian Haupt wrote:
+if ($date =~ s/\.(\d+)$// )
+{
+ my $fraction = $1;
+ $p{'nanosecond'} = (1 / $fraction) * 10**9;
+}
That inversion can't be right. Surely you
Julian Haupt wrote:
+if ($date =~ s/\.(\d+)$// )
+{
+ my $fraction = $1;
+ $p{'nanosecond'} = (1 / $fraction) * 10**9;
+}
That inversion can't be right. Surely you mathematically want
$p{'nanosecond'} = 0.$fraction * 10**9;
but actually the nanoseconds member is
Hello,
i added support for decimal fraction of a
second in DateTime::Format::W3CDTF (as described in
http://www.w3.org/TR/NOTE-datetime)
Please note: There is already a bug report and a patch in ticket #14179
http://rt.cpan.org/Public/Bug/Display.html?id=14179
But this patch looked a bit too