Moment js date time comparison

I believe you are looking for the query functions, isBefore, isSame, and isAfter. But it’s a bit difficult to tell exactly what you’re attempting. Perhaps you are just looking to get the difference between the input time and the current time? If so, consider the difference function, diff. For example: moment().diff(date_time, ‘minutes’) A few other … Read more