aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/events2md.pl15
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/events2md.pl b/bin/events2md.pl
index 282afa8..89bf43f 100755
--- a/bin/events2md.pl
+++ b/bin/events2md.pl
@@ -160,7 +160,8 @@ for my $year ( map { $_->value }
{
print_event(
$calendar_entries{VEVENT}{ $_->key },
- $_->value,
+ $_->value->{DTSTART},
+ $_->value->{DTEND},
$output_path,
);
}
@@ -170,12 +171,14 @@ for my $year ( map { $_->value }
sub print_event
{
- my ( $entry, $event, $path ) = @_;
+ my ( $entry, $start, $end, $path ) = @_;
if ( $log->is_trace ) {
use DDP;
p $entry;
- p $event;
+ p $start;
+ p $end;
+ p $path;
}
my $summary = get_property_string( $entry, 'summary' );
my $description = get_property_string( $entry, 'description' );
@@ -189,9 +192,9 @@ sub print_event
}
}
my $location = get_property_string( $entry, 'location' );
- my $time_begin = ucfirst( $event->{DTSTART}->strftime('%A') );
- $time_begin .= $event->{DTSTART}->strftime(' %e. %B kl. %k.%M');
- my $time_end = $event->{DTEND}->strftime('%k.%M');
+ my $time_begin = ucfirst( $start->strftime('%A') );
+ $time_begin .= $start->strftime(' %e. %B kl. %k.%M');
+ my $time_end = $end->strftime('%k.%M');
my %attachments;
if ( $entry->property('attach') ) {
for ( @{ $entry->property('attach') } ) {