From: Moritz Bunkus Date: Thu, 18 Feb 2010 15:23:08 +0000 (+0100) Subject: Locale::format_date kann auch DateTime-Objekte benutzen X-Git-Tag: release-2.6.2beta1~245 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e500d8b200c003f753584a8c0bfdc088571848e9;p=kivitendo-erp.git Locale::format_date kann auch DateTime-Objekte benutzen --- diff --git a/SL/Locale.pm b/SL/Locale.pm index 754d69cf2..7f8b6c691 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -417,6 +417,8 @@ sub format_date { my $dd = shift; my $yy_len = shift || 4; + ($yy, $mm, $dd) = ($yy->year, $yy->month, $yy->day) if ref $yy eq 'DateTime'; + $main::lxdebug->leave_sub() and return "" unless $yy && $mm && $dd; $yy = $yy % 100 if 2 == $yy_len;