diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/archlinux/man3/Time::Seconds.3perl | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/archlinux/man3/Time::Seconds.3perl')
-rw-r--r-- | upstream/archlinux/man3/Time::Seconds.3perl | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/upstream/archlinux/man3/Time::Seconds.3perl b/upstream/archlinux/man3/Time::Seconds.3perl new file mode 100644 index 00000000..7bde2a79 --- /dev/null +++ b/upstream/archlinux/man3/Time::Seconds.3perl @@ -0,0 +1,140 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" ======================================================================== +.\" +.IX Title "Time::Seconds 3perl" +.TH Time::Seconds 3perl 2024-02-11 "perl v5.38.2" "Perl Programmers Reference Guide" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +Time::Seconds \- a simple API to convert seconds to other date values +.SH SYNOPSIS +.IX Header "SYNOPSIS" +.Vb 2 +\& use Time::Piece; +\& use Time::Seconds; +\& +\& my $t = localtime; +\& $t += ONE_DAY; +\& +\& my $t2 = localtime; +\& my $s = $t \- $t2; +\& +\& print "Difference is: ", $s\->days, "\en"; +.Ve +.SH DESCRIPTION +.IX Header "DESCRIPTION" +This module is part of the Time::Piece distribution. It allows the user +to find out the number of minutes, hours, days, weeks or years in a given +number of seconds. It is returned by Time::Piece when you delta two +Time::Piece objects. +.PP +Time::Seconds also exports the following constants: +.PP +.Vb 9 +\& ONE_DAY +\& ONE_WEEK +\& ONE_HOUR +\& ONE_MINUTE +\& ONE_MONTH +\& ONE_YEAR +\& ONE_FINANCIAL_MONTH +\& LEAP_YEAR +\& NON_LEAP_YEAR +.Ve +.PP +Since perl does not (yet?) support constant objects, these constants are in +seconds only, so you cannot, for example, do this: \f(CW\*(C`print ONE_WEEK\->minutes;\*(C'\fR +.SH METHODS +.IX Header "METHODS" +The following methods are available: +.PP +.Vb 10 +\& my $val = Time::Seconds\->new(SECONDS) +\& $val\->seconds; +\& $val\->minutes; +\& $val\->hours; +\& $val\->days; +\& $val\->weeks; +\& $val\->months; +\& $val\->financial_months; # 30 days +\& $val\->years; +\& $val\->pretty; # gives English representation of the delta +.Ve +.PP +The usual arithmetic (+,\-,+=,\-=) is also available on the objects. +.PP +The methods make the assumption that there are 24 hours in a day, 7 days in +a week, 365.24225 days in a year and 12 months in a year. +(from The Calendar FAQ at http://www.tondering.dk/claus/calendar.html) +.SH AUTHOR +.IX Header "AUTHOR" +Matt Sergeant, matt@sergeant.org +.PP +Tobias Brox, tobiasb@tobiasb.funcom.com +.PP +Balázs Szabó (dLux), dlux@kapu.hu +.SH "COPYRIGHT AND LICENSE" +.IX Header "COPYRIGHT AND LICENSE" +Copyright 2001, Larry Wall. +.PP +This module is free software, you may distribute it under the same terms +as Perl. +.SH Bugs +.IX Header "Bugs" +Currently the methods aren't as efficient as they could be, for reasons of +clarity. This is probably a bad idea. |