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, %params) = _hashify(1, @_);
return $::locale->format_date_object($self, %params);
return $yy && $mm && $dd ? DateTime->new(year => $yy, month => $mm, day => $dd) : undef;
}
+sub format_date_object_to_time {
+ my ($self, $datetime, %params) = @_;
+
+ return $datetime->strftime('%H:%M');
+}
+
sub format_date_object {
my ($self, $datetime, %params) = @_;