Time::Duration::fr - describe time duration in French
Version 1.02
use Time::Duration::fr; my $duration = duration(time() - $start_time);
Time::Duration::fr is a localized version of Time::Duration.
Time::Duration::fr
Time::Duration
Returns English text expressing the approximate time duration of abs($seconds), with at most $precision || 2 expressed units.
abs($seconds)
$precision || 2
Examples:
duration(130) => "2 minutes et 10 secondes" duration(243550) => "2 jours et 20 heures" duration(243550, 1) => "3 jours" duration(243550, 3) => "2 jours, 19 heures, et 39 minutes" duration(243550, 4) => "2 jours, 19 heures, 39 minutes, et 10 secondes"
Same as duration($seconds), except that the returned value is an exact (unrounded) expression of $seconds.
duration($seconds)
$seconds
Example:
duration_exact(31629659) => "1 année, 1 jour, 2 heures, et 59 secondes"
Negative values are passed to from_now() / from_now_exact().
from_now()
from_now_exact()
ago(243550) => "il y a 2 jours et 20 heures" ago(243550, 1) => "il y a 3 jours" ago_exact(243550) => "il y a 2 jours, 19 heures, 39 minutes, et 10 secondes" ago(0) => "maintenant" ago(-243550) => "dans 2 jours et 20 heures" ago(-243550, 1) => "dans 3 jours"
Negative values are passed to ago() / ago_exact().
ago()
ago_exact()
from_now(243550) => "dans 2 jours et 20 heures" from_now(243550, 1) => "dans 3 jours" from_now(0) => "maintenant" from_now(-243550) => "il y a 2 jours et 20 heures" from_now(-243550, 1)=> "il y a 3 jours"
later(243550) => "2 jours et 20 heures plus tard" later(243550, 1) => "3 jours plus tard" later(0) => "maintenant" later(-243550) => "2 jours et 20 heures plus tôt" later(-243550, 1) => "3 jours plus tôt"
earlier(243550) => "2 jours et 20 heures plus tôt" earlier(243550, 1) => "3 jours plus tôt" earlier(0) => "maintenant" earlier(-243550) => "2 jours et 20 heures plus tard" earlier(-243550, 1) => "3 jours plus tard"
concise() takes the string output of one of the above functions and makes it more concise.
concise()
ago(4567) => "il y a 1 heure et 16 minutes" concise(ago(4567)) => "il y a 1h16m" earlier(31629659) => "1 année et 1 jour plus tôt" concise(earlier(31629659)) => "1a1j plus tôt"
Time::Duration, Time::Duration::Locale
Sébastien Aperghis-Tramoni <sebastien at aperghis.net>
<sebastien at aperghis.net>
Please report any bugs or feature requests to bug-time-duration-fr at rt.cpan.org, or through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Dist=Time-Duration-fr. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-time-duration-fr at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Time::Duration::fr
You can also look for information at:
MetaCPAN
https://metacpan.org/pod/Time::Duration::fr
Search CPAN
http://search.cpan.org/dist/Time-Duration-fr
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Time-Duration-fr
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Dist=Time-Duration-fr
CPAN Ratings
http://cpanratings.perl.org/d/Time-Duration-fr
Copyright 2010-2016 Sébastien Aperghis-Tramoni, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Time::Duration::fr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Time::Duration::fr
CPAN shell
perl -MCPAN -e shell install Time::Duration::fr
For more information on module installation, please visit the detailed CPAN module installation guide.