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 weeks, days,
19       hours, and minutes.  The time converted is a relative time, not an
20       absolute time.  The returned time is given in terms of weeks, days,
21       hours, minutes, and seconds, as required to express the seconds count
22       appropriately.
23
24       The fuzzytimetrans() interface converts an integer seconds count into
25       the equivalent number of weeks or days or hours or minutes.  The unit
26       chosen is that which is most natural for the seconds count.  One deci‐
27       mal place of precision is included in the result.
28

INTERFACES

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

EXAMPLES

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

AUTHOR

97       Wayne Morrison, tewok@users.sourceforge.net
98

SEE ALSO

100       timetrans(1)
101
102
103
104perl v5.8.8                       2008-02-15                      timetrans(3)
Impressum