Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diogenesjup/9f45072cf19a9c8b42c4ac17ba7aa5f5 to your computer and use it in GitHub Desktop.
Save diogenesjup/9f45072cf19a9c8b42c4ac17ba7aa5f5 to your computer and use it in GitHub Desktop.
Cálculo de diferença de dias javascript
//Substituir por valores reais.
var data1 = new Date('YYYY', 'MM','DD');
var data2 = new Date('YYYY', 'MM','DD');
var diferenca = parseInt((data1-data2)/(24*3600*1000));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment