X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0d1bb5102f01eb03da55bc87b52ac52cd7ae7534..0f0cb3b708f9078b774a07cecd996e5bdc5fac63:/SL/Locale.pm diff --git a/SL/Locale.pm b/SL/Locale.pm index b6065da77..4fc7a5ee0 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -380,6 +380,17 @@ sub parse_date_to_object { return $yy && $mm && $dd ? DateTime->new(year => $yy, month => $mm, day => $dd) : undef; } +sub format_date_object_to_time { + my ($self, $datetime, %params) = @_; + + my $format = $::myconfig{timeformat} || 'hh:mm'; + $format =~ s/hh/\%H/; + $format =~ s/mm/\%M/; + $format =~ s/ss/\%S/; + + return $datetime->strftime($format); +} + sub format_date_object { my ($self, $datetime, %params) = @_;