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
/** | |
* Recebe um data no formato dd/mm/yyyy e retorna yyyy-mm-dd. | |
* | |
* @param string date - Data no formato 'dd/mm/yyyy'. | |
* @return string - Data no formato 'yyyy-mm-dd'. | |
*/ | |
function dateToEN(date) | |
{ | |
return date.split('/').reverse().join('-'); | |
} |