1timetrans(3)          User Contributed Perl Documentation         timetrans(3)
2
3
4

NAME

6       Net::DNS::SEC::Tools::timetrans - Convert an integer seconds count into
7       text units.
8

SYNOPSIS

10         use Net::DNS::SEC::Tools::timetrans;
11
12         $timestring = timetrans(86488);
13
14         $timestring = fuzzytimetrans(86488);
15

DESCRIPTION

17       The timetrans() interface in Net::DNS::SEC::Tools::timetrans converts
18       an integer seconds count into the equivalent number of days, hours, and
19       minutes.  The time converted is a relative time, not an absolute time.
20       The returned time is given in terms of days, hours, minutes, and
21       seconds, as required to express the seconds count appropriately.
22
23       The fuzzytimetrans() interface converts an integer seconds count into
24       the equivalent number of weeks or days or hours or minutes.  The unit
25       chosen is that which is most natural for the seconds count.  One
26       decimal place of precision is included in the result.
27

INTERFACES

29       The interfaces to the Net::DNS::SEC::Tools::timetrans module are given
30       below.
31
32   timetrans()
33       This routine converts an integer seconds count into the equivalent
34       number of days, hours, and minutes.  This converted seconds count is
35       returned as a text string.  The seconds count must be greater than zero
36       or an error will be returned.
37
38       Return Values:
39
40           If a valid seconds count was given, the count converted into the
41               appropriate text string will be returned.
42
43           An empty string is returned if no seconds count was given or if
44               the seconds count is less than one.
45
46   fuzzytimetrans()
47       This routine converts an integer seconds count into the equivalent
48       number of weeks, days, hours, or minutes.  This converted seconds count
49       is returned as a text string.  The seconds count must be greater than
50       zero or an error will be returned.
51
52       Return Values:
53
54           If a valid seconds count was given, the count converted into the
55               appropriate text string will be returned.
56
57           An empty string is returned if no seconds count was given or if
58               the seconds count is less than one.
59

EXAMPLES

61       timetrans(400) returns 6 minutes, 40 seconds
62
63       timetrans(420) returns 7 minutes
64
65       timetrans(888) returns 14 minutes, 48 seconds
66
67       timetrans(86400) returns 1 day
68
69       timetrans(86488) returns 1 day, 28 seconds
70
71       timetrans(715000) returns 8 days, 6 hours, 36 minutes, 40 second
72
73       timetrans(720000) returns 8 days, 8 hours
74
75       fuzzytimetrans(400) returns 6.7 minutes
76
77       fuzzytimetrans(420) returns 7.0 minutes
78
79       fuzzytimetrans(888) returns 14.8 minutes
80
81       fuzzytimetrans(86400) returns 1.0 day
82
83       fuzzytimetrans(86488) returns 1.0 day
84
85       fuzzytimetrans(715000) returns 1.2 weeks
86
87       fuzzytimetrans(720000) returns 1.2 weeks
88
90       Copyright 2004-2014 SPARTA, Inc.  All rights reserved.  See the COPYING
91       file included with the DNSSEC-Tools package for details.
92

AUTHOR

94       Wayne Morrison, tewok@tislabs.com
95

SEE ALSO

97       timetrans(1)
98
99
100
101perl v5.32.0                      2020-07-27                      timetrans(3)
Impressum