Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

calcular idade jquery

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
Source by pt.stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #calcular #idade #jquery
ADD COMMENT
Topic
Name
9+7 =