Posts by Leandro • 11 points
1 post
-
1
votes6
answers5628
viewsA: Calculate age in years using javascript
If you can use momentjs, it will be simpler to do this calculation. Behold at this link: var birthDay = "1984-10-22"; var age = Math.floor(moment(new Date()).diff(moment(birthDay),'years',true));…