X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7292a4c130fe250da0f95bd6c93a579ebd7eb2d8..3af1d16a776c63cdcf624bcc3eba3e8738ff0ccd:/SL/Locale.pm diff --git a/SL/Locale.pm b/SL/Locale.pm index 754d69cf2..881d5925e 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -213,7 +213,7 @@ sub text { my $self = shift; my $text = shift; - if (exists $self->{texts}->{$text}) { + if ($self->{texts}->{$text}) { $text = $self->{iconv}->convert($self->{texts}->{$text}); } else { $text = $self->{iconv_english}->convert($text); @@ -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;