Moment.js - how do I get the number of years since a date, not rounded up?

前端 未结 0 1215
独厮守ぢ
独厮守ぢ 2020-12-23 04:19

I\'m trying to calculate a person\'s age using Moment.js, but I\'m finding that the otherwise useful fromNow method rounds up the years. For instance, if today is 12/27/2012

相关标签:
回答
  • 消灭零回复
提交回复
热议问题