How to add some minutes to a Date format
تبليغيرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.
So I’m working with the Google Calendar API and because the required date format I´m using the next way to get the starting time:
const date1 = (mail._doc.Data[1].Date + ‘T’ + mail._doc.Data[1].Time )
const startingTime = new Date (date1)
This works and give me the next input that allows me to create the event in the calendar if I manually set the ending time
2022-07-15T21:23:00.000Z
That starting time will change depending of data in the server. For the ending time I would like for it to be the starting time (whatever it is) plus 45 minutes but I cant make it work.
Any help would be appreciated.
أضف إجابة