Open carlosbranco opened 5 years ago
function calcAge(dateString) { var birthday = +new Date(dateString); return ~~((Date.now() - birthday) / (31557600000)); }
HaHa. It's funny. I'll set this function to my CRON job that will tell me every 6 hour my age :)