Created
June 19, 2019 19:07
-
-
Save facine/8e1f4e6aa31b2a81c6a7f3909fed1641 to your computer and use it in GitHub Desktop.
Calculate recurring billing dates (wrong method)
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
<?php | |
// Create a new DateTime object with the first billing date. | |
$date = new DateTime('2019-01-31'); | |
// Add one month and display the wrong result. | |
$date->modify('+1 month'); | |
echo $date->format('Y-m-d'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment