Skip to content

Commit 0989481

Browse files
Merge pull request #127 from VincentChalnot/patch-1
Allowing date formatting for all DateTimeInterface
2 parents c1b3276 + d9b325d commit 0989481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Transformer/DateFormatTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function transform($value, array $options = [])
4141
return $value;
4242
}
4343

44-
if ($value instanceof \DateTime) {
44+
if ($value instanceof \DateTimeInterface) {
4545
$date = $value;
4646
} elseif (is_string($value)) {
4747
@trigger_error('String input will be deprecated in v4.0', E_USER_DEPRECATED);

0 commit comments

Comments
 (0)