0

i have the following dates

Fri Jul 01 2078 00:00:00 GMT+0200 (Central European Summer Time)

and

Sat Jul 02 2078 00:00:00 GMT+0200 (Central European Summer Time)

I need to check if the difference is 4 hours

In this case the difference is 24 hours

If it is Fri Jul 01 2078 00:04:00 GMT+0200 (Central European Summer Time) then i have two hours and it is acceptable.

Also i need to cover the DAYLIGHT SAVINGS TIME.Any idea how can i do this with moment.js ?

  • Convert to UTC and then check if the difference is 4 hours? (a - b == 4hr) – knittl Jul 04 '22 at 12:59
  • 2
    Does this answer your question? [How to get the hours difference between two date objects?](https://stackoverflow.com/questions/19225414/how-to-get-the-hours-difference-between-two-date-objects) – Tom Jul 04 '22 at 12:59

0 Answers0