-
-
05 May 2016 10:13:15 UTC
- Distribution: Time-Duration-fr
- Module version: 1.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (501 / 0 / 0)
- Kwalitee
Bus factor: 0- 90.08% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (5.89KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Sebastien Aperghis-Tramoni
- Dependencies
- Exporter
- Test::More
- Time::Duration
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Time::Duration::fr - describe time duration in French
VERSION
Version 1.02
SYNOPSIS
use Time::Duration::fr; my $duration = duration(time() - $start_time);
DESCRIPTION
Time::Duration::fr
is a localized version ofTime::Duration
.FUNCTIONS
- duration($seconds)
- duration($seconds, $precision)
-
Returns English text expressing the approximate time duration of
abs($seconds)
, with at most$precision || 2
expressed units.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"
- duration_exact($seconds)
-
Same as
duration($seconds)
, except that the returned value is an exact (unrounded) expression of$seconds
.Example:
duration_exact(31629659) => "1 année, 1 jour, 2 heures, et 59 secondes"
- ago($seconds)
- ago($seconds, $precision)
- ago_exact($seconds)
-
Negative values are passed to
from_now()
/from_now_exact()
.Examples:
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"
- from_now($seconds)
- from_now($seconds, $precision)
- from_now_exact($seconds)
-
Negative values are passed to
ago()
/ago_exact()
.Examples:
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($seconds)
- later($seconds, $precision)
- later_exact($seconds)
-
Negative values are passed to
ago()
/ago_exact()
.Examples:
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($seconds)
- earlier($seconds, $precision)
- earlier_exact($seconds)
-
Negative values are passed to
ago()
/ago_exact()
.Examples:
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( function( ... ) )
-
concise()
takes the string output of one of the above functions and makes it more concise.Examples:
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"
SEE ALSO
Time::Duration, Time::Duration::Locale
AUTHOR
Sébastien Aperghis-Tramoni
<sebastien at aperghis.net>
BUGS
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.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Time::Duration::fr
You can also look for information at:
MetaCPAN
Search CPAN
AnnoCPAN: Annotated CPAN documentation
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Dist=Time-Duration-fr
CPAN Ratings
COPYRIGHT & LICENSE
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.
Module Install Instructions
To install Time::Duration::fr, copy and paste the appropriate command in to your terminal.
cpanm Time::Duration::fr
perl -MCPAN -e shell install Time::Duration::fr
For more information on module installation, please visit the detailed CPAN module installation guide.