From e500d8b200c003f753584a8c0bfdc088571848e9 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 18 Feb 2010 16:23:08 +0100 Subject: [PATCH] Locale::format_date kann auch DateTime-Objekte benutzen --- SL/Locale.pm | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.20.1