| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | * @throws \InvalidArgumentException if the value is an unsupported type. |
| 24 | 24 | */ |
| 25 | 25 | public static function format($value, $format) |
| 26 | 26 | { |
| 27 | - if ($value instanceof \DateTime) { | |
| 27 | + if ($value instanceof \DateTimeInterface) { | |
| 28 | 28 | $value = $value->getTimestamp(); |
| 29 | 29 | } elseif (\is_string($value)) { |
| 30 | 30 | $value = \strtotime($value); |
| 31 | 31 | } elseif (!\is_int($value)) { |