Line # | Revision | Author | |
---|---|---|---|
1 | 8 | ahitrov@rambler.ru | <%args> |
2 | $name => undef | ||
3 | $SETS => undef | ||
4 | </%args> | ||
5 | <%init> | ||
6 | return undef unless ref $SETS; | ||
7 | return undef unless $name; | ||
8 | return undef unless $SETS->{$name.'_hour'} =~ /^\d+$/; | ||
9 | return undef unless $SETS->{$name.'_minute'} =~ /^\d+$/; | ||
10 | return undef unless $SETS->{$name.'_second'} =~ /^\d*$/; | ||
11 | |||
12 | return sprintf '%02d:%02d:%02d', $SETS->{$name.'_hour'}, $SETS->{$name.'_minute'}, $SETS->{$name.'_second'} || 0; | ||
13 | </%init> |