We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 25bf656 + 9467b88 commit 53925e5Copy full SHA for 53925e5
1 file changed
lib/Tmdb/Model/Person.php
@@ -265,7 +265,12 @@ public function getChanges()
265
public function setDeathday($deathday)
266
{
267
if (!$deathday instanceof \DateTime && !empty($deathday)) {
268
- $deathday = new \DateTime($deathday);
+ // Is the format Y-m-d ?
269
+ if(strtotime($deathday) === false) {
270
+ $deathday = \DateTime::createFromFormat('Y-d-m', $deathday);
271
+ } else {
272
+ $deathday = new \DateTime($deathday);
273
+ }
274
}
275
276
if (empty($deathday)) {
0 commit comments