Skip to content

Calendar.AddAsync

Overview

Promise<DateTimeOffset> Calendar.AddAsync ( dateTime, hours, [callback] )
Adds specified number of hours to specified date time value and returns.

Arguments

DateTimeOffset dateTime Specifies the base date time value.

Number hours Specifies the how many hours will be added to dateTime parameter.

Function callback Callback to execute. Optional.

Remarks

Examples

//adds 4 hours to the current date and returns the result as a DateTimeOffset object.
$Calendar.AddAsync($Calendar.Today, 4).then(function(newDate) {
    console.log(newDate);
});

See Also