Skip to content

Commit

Permalink
Merge pull request #47 from TheCodingHood/develop
Browse files Browse the repository at this point in the history
Use DateTimeInterface instead of DateTime
  • Loading branch information
eschmar authored Mar 4, 2022
2 parents 48221eb + e0fa484 commit f923711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Twig/TimeAgoExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getFilters()
* @return string
* @author Marcel Eschmann, @eschmar
**/
public function agoFilter(\DateTime $date, $format = null)
public function agoFilter(\DateTimeInterface $date, $format = null)
{
$diff = time() - $date->format('U');
$format = $format ? $format : $this->format;
Expand Down

0 comments on commit f923711

Please sign in to comment.