[TASK] Add options to parse dates
This commit is contained in:
parent
fe832637ed
commit
ca80ae8c20
@ -109,6 +109,22 @@ class ObjectUtility
|
|||||||
$relatedObject
|
$relatedObject
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} elseif (
|
||||||
|
\DateTime::createFromFormat(\DateTime::ISO8601, $value)
|
||||||
|
!== false
|
||||||
|
) {
|
||||||
|
$object->_setProperty(
|
||||||
|
$property,
|
||||||
|
\DateTime::createFromFormat(\DateTime::ISO8601, $value)
|
||||||
|
);
|
||||||
|
} elseif (
|
||||||
|
\DateTime::createFromFormat('Y-m-d\TH:i:s', $value)
|
||||||
|
!== false
|
||||||
|
) {
|
||||||
|
$object->_setProperty(
|
||||||
|
$property,
|
||||||
|
\DateTime::createFromFormat('Y-m-d\TH:i:s', $value)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user