-1

How to compare two date now and date from API example for API 22 September 2020 and date now 01 october 2020

if (this.state.StartDate <= this.state.timeNow)

1 Answers1

0

You can do this with plain JavaScript but I would always recommend to check out Moment.js.

It provides a lot of nice features and makes date and time handling much easier.

Take a look into its documentation to see the power of moment.js and consider using it inside your app. https://momentjs.com/docs/

yesIamFaded
  • 1,970
  • 2
  • 20
  • 45