Created
July 29, 2015 08:44
-
-
Save thorne51/dc29cf4c660395048ac2 to your computer and use it in GitHub Desktop.
Simple test to see what strtotime produces with 31st of a month going back in months with february which only has 28/29 days
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 | |
echo '2015-07-28 -5 month: ' . date('Y-m-d', strtotime('2015-07-28 -5 month')) . "\r\n"; | |
echo '2015-07-29 -5 month: ' . date('Y-m-d', strtotime('2015-07-29 -5 month')) . "\r\n"; | |
echo '2015-07-30 -5 month: ' . date('Y-m-d', strtotime('2015-07-30 -5 month')) . "\r\n"; | |
echo '2015-07-31 -5 month: ' . date('Y-m-d', strtotime('2015-07-31 -5 month')) . "\r\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output: