1

My token expire time value(currentUser.expire) is '2018-08-01T17:29:17+01:00'

I want to compare the current time.

currentUser.expire > new Date().valueOf() 


new Date().valueOf() is '1533110765293'

The format of the two values is different.

What is the most appropriate method?

2

1 Answer 1

3
if (new Date('2018-08-01T17:29:17+01:00') > new Date()) { // do something } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.