Created
March 26, 2018 15:20
-
-
Save pedro-stanaka/2179a2453ca39ce9aff53ac297f513e6 to your computer and use it in GitHub Desktop.
Date Formatting with Intl
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 | |
$fmt = datefmt_create( | |
'en_US', | |
IntlDateFormatter::FULL, | |
IntlDateFormatter::FULL, | |
'UTC', | |
IntlDateFormatter::GREGORIAN, | |
"y-MM-dd'T'H:mm:ssX" | |
); | |
$date = new DateTime(); | |
echo $fmt->format($date->getTimestamp()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment