My backend is sending me the date-time stamp of a document and I want to calculate the age of that document in frontend I am using moment but don't know how to calculate the difference between them
var TodaysDate = new Date(); //Mon May 09 2022 22:52:42 GMT+0530 (India Standard Time)
var DateFromServer = Entity; // 2021-05-02T13:18:00.000Z
i want Answer in years like 3.4 years