Revision 3 (by ahitrov@rambler.ru, 2010/03/24 15:19:32) The CORE
<% $strtime %>
<%ONCE>

	my @smonth = (
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
		'���',
	);

</%ONCE>
<%ARGS>

	$dtime
	$digital_month => undef

</%ARGS>
<%INIT>

	return unless $dtime;

	use locale;

	my @cur_time = localtime();
	my ($sdate, $stime) = split( ' ', $dtime );
	my @time = split( ':', $stime );
	@time = ($time[0], $time[1]);
	my @date = split( '-', $sdate );

	my $strtime = $date[2]; # ����
	$strtime .= ( $digital_month ? '.'.$date[1] : ' '.$smonth[$date[1]-1] );
	$strtime .= ( $cur_time[5]+1900 == $date[0] ? '' : ($digital_month?'.':' ').$date[0] );
	$strtime .= ' ['.join( ':', @time ).']';

</%INIT>