Revision 469 (by ahitrov, 2014/12/24 13:57:26) |
Moving Contenido to Apache 2
|
<%args>
$name => undef
$SETS => undef
</%args>
<%init>
return undef unless ref $SETS;
return undef unless $name;
return undef unless $SETS->{$name.'_year'} =~ /^\d+$/;
return undef unless $SETS->{$name.'_month'} =~ /^\d+$/;
return undef unless $SETS->{$name.'_day'} =~ /^\d+$/;
return undef unless $SETS->{$name.'_hour'} =~ /^\d+$/;
return undef unless $SETS->{$name.'_minute'} =~ /^\d+$/;
return undef unless $SETS->{$name.'_second'} =~ /^\d*$/;
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;
</%init>