NAME

Time::Decimal -- Handle french revolutionary time

SYNOPSIS

    use Time::Decimal qw($precision h24s_h10 h24_h10 h10s_h24 h10_h24
			 transform now_h10 loop);
    $precision = 'ms';

    $dec = h24s_h10( 1234.5678 );
    $dec = h24_h10( 13, 23, 45, 345_678 );
    $bab = h10s_h24( 1234.5678 );
    $bab = h10_h24( 1, 50, 75, 345_678 );

    $dec = transform( '1:23:45.345_678 pm' );
    $bab = transform( '1_50_75.345_678' );

DESCRIPTION

La babilona 24-hora horloĝo estas unu de la lastaj komplikaj restaĵoj de la antaŭ-dekuma aĝo. La franca revolucio, kiam ĝi kreis dekumajn mezurojn por ĉio, ankaŭ inventis disdividon de la tago en dek horojn, ĉiuj je 100 minutoj kaj tiuj de 100 sekundoj. La avantaĝo estas ke sekundoj kaj minutoj daŭras proksimume same kiel tiuj kiujn ni konas. Horoj kompreneble daŭras pli ol duoble.

Por povi memstare rekoni dekuman tempon, ni uzas _ anstataŭ : kiel separilo. Tiu signo uzeblas en multe pli da komputilaj kuntekstoj. En Perl ĝi estas ebla separilo inter ciferoj. Kaj pri tio ja temas ĉi tie, ĉar dekuma tempo H_MM estas nenio alia ol tri-cifera nombro da minutoj. Samo direblas pri kvin-cifera nombro da sekundoj

So as to be able to automatically recognize decimal time, we use _ instead of : as a separator. This character is usable in many more computer contexts. In Perl it is a possible separator between digits. And that's what it means here, because a decimal time H_MM is nothing else than a three digit number of minutes. The same applies to five digit numbers of seconds.

Module Interface

Nothing is exported by default, but all of the following may be imported by the use statement:

Nenio estas memstare elportita, sed vi povas enporti la sekvajn per la use ordono:

$precision
's'	seconds
'ds'	deciseconds
'cs'	centiseconds
'ms'	milliseconds
'µs', 'us'	microseconds

UTF-8, Latin-1, -3, -5, -7 or Latin-9

SEE ALSO

DateTime::Calendar::FrenchRevolutionary fits nicely into the DateTime hierarchy. Alas that doesn't handle fractions, so they have a lossy transformation. Besides fractions are much more natural in decimal time.

AUTHOR

Daniel Pfeiffer <occitan@esperanto.org>