blob: c0b4d9af4410b84f90ec9704b173deff754d29d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<%$days|'00'%> days <%$hours|'00'%>:<%$minutes|'00'%>
<%INIT>
my $MINUTE = 60;
my $HOUR = $MINUTE*60;
my $DAY = $HOUR * 24;
my $WEEK = $DAY * 7;
my $days = int($Duration / $DAY);
$Duration = $Duration % $DAY;
my $hours = int($Duration / $HOUR);
$hours = sprintf("%02d", $hours);
$Duration = $Duration % $HOUR;
my $minutes = int($Duration/$MINUTE);
$minutes = sprintf("%02d", $minutes);
</%INIT>
<%ARGS>
$Duration => undef
</%ARGS>
|