Last active
July 16, 2018 20:04
-
-
Save cygeorgel/f578de32f76b48b81765910e924f26dd to your computer and use it in GitHub Desktop.
DateTime diff someDate / today
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isset ($test->serviceStart)) { | |
$diff = $test->serviceStart->diff(new \Carbon\Carbon); | |
$nbMonths = ($diff->format('%y') * 12) + $diff->format('%m'); | |
} |
Author
cygeorgel
commented
Jul 16, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment