Last active
September 28, 2017 15:14
-
-
Save chrisdigital/3904052 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