projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Locale::format_date kann auch DateTime-Objekte benutzen
[kivitendo-erp.git]
/
SL
/
Locale.pm
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;