X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/a1a9bb961ab49ee053cb208ea01e17430d0ca836..7647d46:/SL/Helper/DateTime.pm diff --git a/SL/Helper/DateTime.pm b/SL/Helper/DateTime.pm index 59a100c2a..b72207f8a 100644 --- a/SL/Helper/DateTime.pm +++ b/SL/Helper/DateTime.pm @@ -10,16 +10,26 @@ sub today_local { return shift->now(time_zone => $::locale->get_local_time_zone)->truncate(to => 'day'); } -sub to_lxoffice { +sub to_kivitendo { my $self = shift; my %params = (scalar(@_) == 1) && (ref($_[0]) eq 'HASH') ? %{ $_[0] } : @_; return $::locale->format_date_object($self, %params); } -sub from_lxoffice { +sub to_lxoffice { + # Legacy name. + goto &to_kivitendo; +} + +sub from_kivitendo { return $::locale->parse_date_to_object(\%::myconfig, $_[1]); } +sub from_lxoffice { + # Legacy name. + goto &from_kivitendo; +} + 1; __END__ @@ -42,18 +52,22 @@ Returns the current time with the time zone set to the local time zone. Returns the current date with the time zone set to the local time zone. -=item C +=item C -Formats the date and time according to the current Lx-Office user's +Formats the date and time according to the current kivitendo user's date format with L. -=item C +The legacy name C is still supported. -Parses a date string formatted in the current Lx-Office user's date +=item C + +Parses a date string formatted in the current kivitendo user's date format and returns an instance of L. Note that only dates can be parsed at the moment, not the time -component (as opposed to L). +component (as opposed to L). + +The legacy name C is still supported. =back