Skip to content

Instantly share code, notes, and snippets.

Chris Tiearney thorne51

  • Centurion, Gauteng, South Africa
Block or report user

Report or block thorne51

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thorne51
thorne51 / dates.php
Created Jul 29, 2015
Simple test to see what strtotime produces with 31st of a month going back in months with february which only has 28/29 days
View dates.php
<?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";
You can’t perform that action at this time.