Query: time::seconds
OS: mojave
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Time::Seconds(3pm) Perl Programmers Reference Guide Time::Seconds(3pm)NAMETime::Seconds - a simple API to convert seconds to other date valuesSYNOPSISuse Time::Piece; use Time::Seconds; my $t = localtime; $t += ONE_DAY; my $t2 = localtime; my $s = $t - $t2; print "Difference is: ", $s->days, " ";DESCRIPTIONThis 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. Time::Seconds also exports the following constants: ONE_DAY ONE_WEEK ONE_HOUR ONE_MINUTE ONE_MONTH ONE_YEAR ONE_FINANCIAL_MONTH LEAP_YEAR NON_LEAP_YEAR Since perl does not (yet?) support constant objects, these constants are in seconds only, so you cannot, for example, do this: "print ONE_WEEK->minutes;"METHODSThe following methods are available: 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 The usual arithmetic (+,-,+=,-=) is also available on the objects. 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)AUTHORMatt Sergeant, matt@sergeant.org Tobias Brox, tobiasb@tobiasb.funcom.com BalXzs SzabX (dLux), dlux@kapu.huLICENSEPlease see Time::Piece for the license. Bugs Currently the methods aren't as efficient as they could be, for reasons of clarity. This is probably a bad idea.POD ERRORSHey! The above document had some coding errors, which are explained below: Around line 245: Non-ASCII character seen before =encoding in 'BalXzs'. Assuming UTF-8 perl v5.18.2 2014-01-06 Time::Seconds(3pm)
Related Man Pages |
---|
calendar(3erl) - linux |
time::piece(3pm) - mojave |
time::piece5.18(3pm) - mojave |
time::piece(3perl) - debian |
time::seconds(3pm) - suse |
Similar Topics in the Unix Linux Community |
---|
How to convert hex numbers to decimal ? |
Mapping PF Keys in Vi |
CurrentTime-4 hours |
Time travel |
Duration Calculation |