function calcAge(dateString) { var birthday = +new Date(dateString); return ~~((Date.now() - birthday) / (31557600000)); } console.log(calcAge("Thu Dec 17 1995 00:51:54 GMT-0300 (BRT)")); Executar