From f26bb3efd5bef452b6b5d2649ee5457599363f82 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sun, 24 Nov 2013 23:45:11 +0100 Subject: [PATCH] Refacotring dates in releases --- examples/movies/model/all.php | 2 +- lib/Tmdb/Model/Movie/Release.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/movies/model/all.php b/examples/movies/model/all.php index 42776cf6..13bed762 100644 --- a/examples/movies/model/all.php +++ b/examples/movies/model/all.php @@ -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"; diff --git a/lib/Tmdb/Model/Movie/Release.php b/lib/Tmdb/Model/Movie/Release.php index b1578751..89856062 100644 --- a/lib/Tmdb/Model/Movie/Release.php +++ b/lib/Tmdb/Model/Movie/Release.php @@ -68,7 +68,7 @@ public function getIso31661() */ public function setReleaseDate($releaseDate) { - $this->releaseDate = $releaseDate; + $this->releaseDate = new \DateTime($releaseDate); return $this; }