Skip to content

Instantly share code, notes, and snippets.

@eduardosilva
Created January 6, 2014 19:21
Show Gist options
  • Save eduardosilva/8288209 to your computer and use it in GitHub Desktop.
Save eduardosilva/8288209 to your computer and use it in GitHub Desktop.
Script to calculate age in javascript
birthday = Date.parse('2013/03/27');
age = ~~((Date.now() - birthday) / (31557600000));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment