use strict;
+use SL::Util qw(_hashify);
+
sub now_local {
return shift->now(time_zone => $::locale->get_local_time_zone);
}
return shift->now(time_zone => $::locale->get_local_time_zone)->truncate(to => 'day');
}
+sub to_kivitendo_time {
+ my ($self, %params) = _hashify(1, @_);
+ return $::locale->format_date_object_to_time($self, %params);
+}
+
sub to_kivitendo {
- my $self = shift;
- my %params = (scalar(@_) == 1) && (ref($_[0]) eq 'HASH') ? %{ $_[0] } : @_;
+ my ($self, %params) = _hashify(1, @_);
return $::locale->format_date_object($self, %params);
}