Sunday, 26 July 2020

How to use moment module to add hours?

Hi,What basically I am trying to achieve is that I have a time stored somewhere let's say 10:00 and I want to add some hours in it.What I tried :var time = moment("10:00", "HH:MM");time.add(5,'hours')But this does not work. I am not even sure if I am initializing it right or not. Can someone help here?

Submitted July 26, 2020 at 01:33PM by GhostFoxGod

No comments:

Post a Comment