DateTime-Precise

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

time including fractional seconds.

DateTime::Precise.pm is not intended to be a replacement for any of
the existing Date:: or Time:: modules, but you may find it useful as a
supplement.  Notable features:

  * Date and time can include fractional seconds.

  * Date is represented internally by an array of year, month, day,
    hours, minutes, seconds, and fractional seconds.  Using this method,
    dates as far back as the start of the Gregorian calendar) can be
    used.

  * Methods are provided for doing date/time calculations.
    Increment and decrement, as well as round, floor and ceil
    functions by unit (second through year) are provided, as well as
    simple date-difference operations.

  * Methods are provided for input from and output to user-specified
    formats (dprintf, dscanf, get_time, set_time, strftime).

lib/DateTime/Precise.pm  view on Meta::CPAN

 $gps_day     = $t1->gps_day;
 ($gps_week, $gps_seconds, $gps_day) = $t1->gps_week_seconds_day;

=head1 DESCRIPTION

The purpose of this library was to replace our dependence on Unix
epoch time, which, being limited to a range of about 1970 to 2030, is
inadequate for our purposes (we have data as old as 1870).  This date
library effectively handles dates from A.D. 1000 to infinity, and
would probably work all the way back to 0 (ignoring, of course, the
switch-over to the Gregorian calendar).  The useful features of Unix
epoch time (ease of date difference calculation and date comparison,
strict ordering) are preserved, and elements such as human-legibility
are added.  The library handles fractional seconds and some date/time
manipulations used for the Global Positioning Satellite system.

The operators +/-, <=>, cmp, stringify are overloaded.  Addition
handles seconds and fractions of seconds, subtraction handles seconds
or date differences, compares work, and stringification returns the a
representation of the date.



( run in 0.400 second using v1.01-cache-2.11-cpan-5dc5da66d9d )