Skip to content

Commit

Permalink
✨ Make it possible to use Carbon instances
Browse files Browse the repository at this point in the history
  • Loading branch information
marcreichel committed Nov 7, 2021
1 parent 1469a6f commit e3e6270
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,9 @@ private function castDate(mixed $date): mixed
if (is_string($date)) {
return Carbon::parse($date)->timestamp;
}
if ($date instanceof Carbon) {
return $date->timestamp;
}
return $date;
}

Expand Down

0 comments on commit e3e6270

Please sign in to comment.