X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLocale.pm;h=4fc7a5ee0da13a4e3f08eb63ea81892b18861139;hb=165d1a99e7402a0cbd600dfd4a56cec8feff9ae5;hp=b6065da7761d8f9df1054c1c9fc49ed242603d29;hpb=0d1bb5102f01eb03da55bc87b52ac52cd7ae7534;p=kivitendo-erp.git 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) = @_;