Skip to content

Commit

Permalink
Refacotring dates in releases
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Nov 24, 2013
1 parent 146249e commit f26bb3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/movies/model/all.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
echo "Releases\n";

foreach($movie->getReleases() as $release) {
printf(" - %s on %s\n", $release->getIso31661(), $release->getReleaseDate());
printf(" - %s on %s\n", $release->getIso31661(), $release->getReleaseDate()->format('d-m-Y'));
}

echo "Translations\n";
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Model/Movie/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getIso31661()
*/
public function setReleaseDate($releaseDate)
{
$this->releaseDate = $releaseDate;
$this->releaseDate = new \DateTime($releaseDate);
return $this;
}

Expand Down

0 comments on commit f26bb3e

Please sign in to comment.