Overview
Adds specified number of months to specified date time value and returns asynchronously.Promise<DateTimeOffset> Calendar.AddMonthsAsync(dateTime: DateTimeOffset, months: number)
Arguments
DateTimeOffset dateTime
Specifies the base date time value.
number months
Specifies the how many months will be added to dateTime parameter.
Example
Code Block | ||
---|---|---|
| ||
//adds 2 months to the current date and returns DateTimeOffset object. $Calendar.AddMonthsAsync($Calendar.Today, 2).then(function(newDate) { console.log(newDate); }); |
Examples
Code Block | ||
---|---|---|
| ||
//adds 2 months to the current date and returns DateTimeOffset object. $Calendar.AddMonthsAsync($Calendar.Today, 2).then(function(newDate) { console.log(newDate); }); |