use map instead for on creating hash tables

This commit is contained in:
Milan
2020-03-05 22:16:54 +01:00
parent da5f7f673d
commit 41b0495c2e
24 changed files with 40 additions and 144 deletions

View File

@@ -164,10 +164,7 @@ sub get($$) {
exclude_locations => 1,
}
);
my $used_day = {};
for my $day (@$used_days) {
$used_day->{ $day->{start_date} } = 1;
}
my $used_day = { map { $_->{start_date} => 1 } @$used_days };
for my $year ( sort { $a <=> $b } keys %$years ) {
my $months = $years->{$year};