Created
October 15, 2014 09:33
-
-
Save chardcastle/9eff528a8752a05abfac to your computer and use it in GitHub Desktop.
DateTime calculator
This file contains hidden or 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 | |
var_dump(DateTime::createFromFormat('d-m-Y','01-01-2013')->add(date_interval_create_from_date_string('2 years'))->format('d-m-Y')); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment