Skip to content

Instantly share code, notes, and snippets.

@chrisdigital
Last active September 28, 2017 15:14
Show Gist options
  • Save chrisdigital/3904052 to your computer and use it in GitHub Desktop.
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")
```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