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.'_year'} =~ /^\d+$/; |
9 |
|
|
return undef unless $SETS->{$name.'_month'} =~ /^\d+$/; |
10 |
|
|
return undef unless $SETS->{$name.'_day'} =~ /^\d+$/; |
11 |
|
|
return undef unless $SETS->{$name.'_hour'} =~ /^\d+$/; |
12 |
|
|
return undef unless $SETS->{$name.'_minute'} =~ /^\d+$/; |
13 |
|
|
return undef unless $SETS->{$name.'_second'} =~ /^\d*$/; |
14 |
|
|
|
15 |
|
|
return sprintf '%04d-%02d-%02d %02d:%02d:%02d', $SETS->{$name.'_year'}, $SETS->{$name.'_month'}, $SETS->{$name.'_day'}, $SETS->{$name.'_hour'}, $SETS->{$name.'_minute'}, $SETS->{$name.'_second'} || 0; |
16 |
|
|
</%init> |