Skip to content

Commit c0b745a

Browse files
authored
Update Calendar.php
1 parent 496fe63 commit c0b745a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Imdb/Calendar.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ protected function buildDateString($dateParts)
4444
}
4545

4646
$year = $dateParts['year'];
47-
$month = $dateParts['month'];
48-
$day = $dateParts['day'];
49-
$releaseDate = "{$year}-{$month}-{$day}";
50-
$releaseDate = date("Y-m-d", strtotime($releaseDate));
47+
$month = str_pad((string) $dateParts['month'], 2, '0', STR_PAD_LEFT);
48+
$day = str_pad((string) $dateParts['day'], 2, '0', STR_PAD_LEFT);
5149

5250
return "{$year}-{$month}-{$day}";
5351
}

0 commit comments

Comments
 (0)