diff options
-rwxr-xr-x | mga-treasurer | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mga-treasurer b/mga-treasurer index bc06e3c..1efe831 100755 --- a/mga-treasurer +++ b/mga-treasurer @@ -68,7 +68,7 @@ sub donations_infos { ); foreach my $don (@{$res{donations}}) { my $dt = DateTime->from_epoch(epoch => $don->{date}); - my $month = $dt->year . '-' . $dt->month; + my $month = $dt->year . '-' . sprintf("%02d", $dt->month); my $year = $dt->year; push @{$res{by_month}->{$month}->{donations}}, $don; $res{by_month}->{$month}->{year} = $year; |