Compare two date in TypeScript inside a condition
13:26 15 Nov 2022

In one refresh token I want to compare two different dates. Premised that I work in angular, the first value is Date.now() that obviously returns the current date, and the second parameter is one expirationDate (for example "2022-11-15T18:05:46.1645237+01:00").

So if the current date is most of the expiration date, return true. How can I make one IF for this situation?

javascript angular typescript date compare