1 |
8 |
ahitrov@rambler.ru |
<% $strtime %> |
2 |
|
|
<%ONCE> |
3 |
|
|
|
4 |
|
|
my @smonth = ( |
5 |
|
|
'янв', |
6 |
|
|
'фев', |
7 |
|
|
'мар', |
8 |
|
|
'апр', |
9 |
|
|
'май', |
10 |
|
|
'июн', |
11 |
|
|
'июл', |
12 |
|
|
'авг', |
13 |
|
|
'сен', |
14 |
|
|
'окт', |
15 |
|
|
'ноя', |
16 |
|
|
'дек', |
17 |
|
|
); |
18 |
|
|
|
19 |
|
|
</%ONCE> |
20 |
|
|
<%ARGS> |
21 |
|
|
|
22 |
|
|
$dtime |
23 |
|
|
$digital_month => undef |
24 |
|
|
|
25 |
|
|
</%ARGS> |
26 |
|
|
<%INIT> |
27 |
|
|
|
28 |
|
|
return unless $dtime; |
29 |
|
|
|
30 |
|
|
use locale; |
31 |
|
|
|
32 |
|
|
my @cur_time = localtime(); |
33 |
|
|
my ($sdate, $stime) = split( ' ', $dtime ); |
34 |
|
|
my @time = split( ':', $stime ); |
35 |
|
|
@time = ($time[0], $time[1]); |
36 |
|
|
my @date = split( '-', $sdate ); |
37 |
|
|
|
38 |
|
|
my $strtime = $date[2]; # День |
39 |
|
|
$strtime .= ( $digital_month ? '.'.$date[1] : ' '.$smonth[$date[1]-1] ); |
40 |
|
|
$strtime .= ( $cur_time[5]+1900 == $date[0] ? '' : ($digital_month?'.':' ').$date[0] ); |
41 |
|
|
$strtime .= ' ['.join( ':', @time ).']'; |
42 |
|
|
|
43 |
|
|
</%INIT> |