Skip to content

Instantly share code, notes, and snippets.

@oidacra
Created January 23, 2015 22:04
Show Gist options
  • Select an option

  • Save oidacra/a5dd7125c116549f547f to your computer and use it in GitHub Desktop.

Select an option

Save oidacra/a5dd7125c116549f547f to your computer and use it in GitHub Desktop.
Calcular Edad JS
// Kristoffer Dorph
function calcAge(dateString) {
var birthday = +new Date(dateString);
return~~ ((Date.now() - birthday) / (31557600000));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment