diff options
-rw-r--r-- | lib/Object/Groupware/Event.pm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Object/Groupware/Event.pm b/lib/Object/Groupware/Event.pm index c5ccb6e..4e8ed8e 100644 --- a/lib/Object/Groupware/Event.pm +++ b/lib/Object/Groupware/Event.pm @@ -16,7 +16,7 @@ field $log = Log::Any->get_logger; field $entry : param; field $dt_locale; -field $begin : reader = $entry->start; +field $start : reader = $entry->start; field $end : reader = $entry->end; field $datespan : reader; field $timespan : reader; @@ -31,7 +31,7 @@ field @attachments; ADJUST { if ( $self->dt_locale ) { $dt_locale = $self->dt_locale; - $begin->set_locale($dt_locale); + $start->set_locale($dt_locale); $end->set_locale($dt_locale) if defined $end; } else { @@ -40,26 +40,26 @@ ADJUST { $dt_locale = DateTime::Locale->load('en_US'); } - $begin->set_locale( $self->dt_locale ); + $start->set_locale( $self->dt_locale ); for ( $self->dt_time_zone || () ) { - $begin->set_time_zone($_); + $start->set_time_zone($_); $end->set_time_zone($_) if defined $end; } $datespan = ( defined $end and $end->clone->truncate( to => 'day' ) ne - $begin->clone->truncate( to => 'day' ) ) + $start->clone->truncate( to => 'day' ) ) ? ucfirst( sprintf '%s - %s', - $begin->format_cldr( $dt_locale->date_format_medium() ), + $start->format_cldr( $dt_locale->date_format_medium() ), $end->format_cldr( $dt_locale->date_format_medium() ) ) - : ucfirst( $begin->format_cldr( $dt_locale->date_format_medium() ) ); + : ucfirst( $start->format_cldr( $dt_locale->date_format_medium() ) ); $timespan = ( defined $end and not $entry->all_day ) ? ucfirst( sprintf '%s-%s', - $begin->format_cldr( $dt_locale->datetime_format_medium() ), + $start->format_cldr( $dt_locale->datetime_format_medium() ), $end->format_cldr( $dt_locale->time_format_medium() ) ) : undef; @@ -67,7 +67,7 @@ ADJUST { = $entry->all_day ? $datespan : ucfirst( - $begin->format_cldr( $dt_locale->datetime_format_medium() ) ); + $start->format_cldr( $dt_locale->datetime_format_medium() ) ); $description =~ s/\n\n[Pp]ris:\s*((?!\n).+)\s*\z//m; $price = $1; @@ -94,7 +94,7 @@ ADJUST { if ( $log->is_trace ) { use DDP; p $entry; - p $begin; + p $start; p $end; } } |