Last active
November 26, 2015 19:21
-
-
Save kelvearagao/2714129c19a64758dea5 to your computer and use it in GitHub Desktop.
Conversor de data no formato EN para o formato BR.
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 | |
/** | |
* Receives a date in the EN format (Y-m-d) and renturns in the BR format (d/m/Y). | |
* | |
* @param string $date - format 'Y-m-d'. | |
* @return string - format 'd/m/Y'. | |
*/ | |
function dateFromEnToBr($date) | |
{ | |
return date('d/m/Y', strtotime($date)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment