Skip to content

Instantly share code, notes, and snippets.

@phsantiago
Created April 13, 2016 19:06
Show Gist options
  • Save phsantiago/60d66b08e4ebc933643aa5add08b3c4a to your computer and use it in GitHub Desktop.
Save phsantiago/60d66b08e4ebc933643aa5add08b3c4a to your computer and use it in GitHub Desktop.
preg_replace('/^([\d]{4})-([\d]{2})-([\d]{2})$/', '$3/$2/$1', $date);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment