I have a property created_at
which stores Date and time of users that sign in for. So using Moment.js I want to get the number of days from "latest date" -"created_at".
moment(new Date()).diff(tag.created_at)
I have a property created_at
which stores Date and time of users that sign in for. So using Moment.js I want to get the number of days from "latest date" -"created_at".
moment(new Date()).diff(tag.created_at)
You should be able to get the number of days between to dates a
and b
as follows (using Moment):
a.diff(b, 'days')