Dave Rolsky wrote:
> See, some people think it should be another attribute, 
> other think that seconds should be floating point.  
> Personally, I don't know. 
> But if it's another attribute it needs a precision.  
> I don't want to call it "fractional seconds" and let 
> each user decide, because that kills inter-operability.

I had that problem in Date::Tie, and I solved it by storing
"integer-seconds"  and "fraction-of-seconds" separately:

  ($int_second, $frac_second) = f( 1234.4567 );
  # $int_second = 1234
  # $frac_second = 0.4567

This way, frac_second if a full-precision real (at least 9 digits),
whatever the value of int_second.
The parser actually splits on /[\.\,]/, such that it works
in many languages (some languages use comma as the separator).

- Flavio S. Glock

Reply via email to