Last active
December 26, 2015 02:59
-
-
Save egulhan/7082225 to your computer and use it in GitHub Desktop.
Convert 2 digit year to 4 digit year
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
$dt = DateTime::createFromFormat('y', '12'); | |
echo $dt->format('Y'); // output: 2012 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment