I want to add 10 minutes to a predefined time.
for example:
public morning = 7:30
Now I need to add 10 minutes to the morning. How I can do it?
Thanks
I want to add 10 minutes to a predefined time.
for example:
public morning = 7:30
Now I need to add 10 minutes to the morning. How I can do it?
Thanks
Thanks, problem solved <3
It works only on the current date and time. The function not getting pre-defined time (7:00), please can you help me.
I am doing this but not working:
morning = 7:00
addMinutes(morning, 10)
no result invalid
Why don’t you use moment.js module, it is amazing for both Date and Time operations ,
in your case
moment().add(10, 'minutes').format('hh:mm A');
just this line will do your work.