-
-
Save Aleksandar-Mitic/42eb9d7aafb5d99d7dd7c5dde0457b0c to your computer and use it in GitHub Desktop.
Little date function to convert XX/XX/XXXX into verbose date (e.g. "January 11, 2015")
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 | |
function dateConvert($x_date){ | |
$x_date = explode('/', $x_date, 4); | |
$x_months = array('','January','Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); | |
$x_month = intval($x_date[0]); | |
$x_day = intval($x_date[1]); | |
$x_year = $x_date[2]; | |
return ($x_months[$x_month]." ".$x_day. ", ".$x_year); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment