0

I have a time string and moment to parse like this:

const d: string = '2019-05-30T00:05:46.987Z'
const date: Date = moment.utc(d)

What I want is to check this time if its in max. 10 min. old. If its more than 10 minutes then false should given. I want to do this checking against UTC and not the timezone by browser/user.

How can I do that?

I am trying to determine if given object and its time is fresh or not.

Dennis
  • 1,805
  • 3
  • 22
  • 41

0 Answers0