Revision 5bdbae05
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/DB/TimeRecording.pm | ||
---|---|---|
115 | 115 |
sub displayable_times { |
116 | 116 |
my ($self) = @_; |
117 | 117 |
|
118 |
# placeholder |
|
119 |
my $ph = $::locale->format_date_object(DateTime->new(year => 1111, month => 11, day => 11, hour => 11, minute => 11), precision => 'minute'); |
|
120 |
$ph =~ s{1}{-}g; |
|
118 |
my $text; |
|
121 | 119 |
|
122 |
return ($self->start_time_as_timestamp||$ph) . ' - ' . ($self->end_time_as_timestamp||$ph); |
|
120 |
if ($self->is_duration_used) { |
|
121 |
$text = $self->date_as_date . ': ' . ($self->duration_as_duration_string || '--:--'); |
|
122 |
|
|
123 |
} else { |
|
124 |
# placeholder |
|
125 |
my $ph = $::locale->format_date_object(DateTime->new(year => 1111, month => 11, day => 11, hour => 11, minute => 11), precision => 'minute'); |
|
126 |
$ph =~ s{1}{-}g; |
|
127 |
$text = ($self->start_time_as_timestamp||$ph) . ' - ' . ($self->end_time_as_timestamp||$ph); |
|
128 |
} |
|
129 |
|
|
130 |
return $text; |
|
123 | 131 |
} |
124 | 132 |
|
125 | 133 |
1; |
Auch abrufbar als: Unified diff
Zeiterfassung: Bei Zeitanzeige auch Varianten mit Datum und Dauer berücksichtigen