Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Overview

Returns sum of specified dateTime and timespan string asynchronously.

Promise<DateTimeOffset> myCalendar.AddTimeSpanAsync(dateTime: DateTimeOffset, time: string)

Arguments

Specifies the base date time value.
string time
The time parameter is in the "d.hh:mm:ss" format

Remarks

Please make sure that you are using the right calendar object, since adding time is related with your calendar of choice. You can have more info on Calendar definitions by checking the $Calendar object.

Example

//Adds exactly 1 day, 2 hours, 30 minutes and 45 seconds to the current time.
$Calendar.StandardCalendar.AddTimeSpanAsync(new DateTimeOffset(), '1.02:30:45').then(function(newDate) {
console.log(newDate);
});
  • No labels