projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7292a4c
)
Locale::format_date kann auch DateTime-Objekte benutzen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 18 Feb 2010 15:23:08 +0000
(16:23 +0100)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 20 Jul 2010 11:28:44 +0000
(13:28 +0200)
SL/Locale.pm
patch
|
blob
|
history
diff --git
a/SL/Locale.pm
b/SL/Locale.pm
index
754d69c
..
7f8b6c6
100644
(file)
--- 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;