Posts by Eduardo Costa • 49 points
1 post
-
4
votes12
answers208289
viewsA: How to format date in Javascript?
function formatDate(data, formato) { if (formato == 'pt-br') { return (data.substr(0, 10).split('-').reverse().join('/')); } else { return (data.substr(0, 10).split('/').reverse().join('-')); } }…