#!/usr/bin/perl
use strict;
use warnings;

use Data::ICal;
use Data::ICal::DateTime;
use DateTime;

my $cal = Data::ICal->new(filename => $ARGV[0]);

my @events = $cal->events();

foreach my $event (@events) {
	my $start = $event->start;
	$start =~ s/(.*)T(\d{2}:\d{2}):\d{2}/$2/;
	my $end = $event->end;
	$end =~ s/(.*)T(\d{2}:\d{2}):\d{2}/$2/;
        print "$start - $end ", $event->property('summary')->[0]->value, "\n";
}
