Calendar.GetDateTimeAsync
Overview
Returns the next valid date time by calendar rules.
Promise<
DateTimeOffset> myCalendar.GetDateTimeAsync(relativeDate: string, offset: ( Date |
DateTimeOffset ))
Arguments
string relativeDate
Specifies the relative date time value in duration format. (Ex: 4.00:00:00 or P4DT0H0M0S)
( Date | DateTimeOffset ) offset
Specifies the offset value for relative date time. Optional, if not specified current date time is used.
Returns
The next valid date time by calendar rules.
var nextDate = await $Calendar.GetDateTimeAsync('PT2H', DateTimeOffset.parse('2023-02-08T17:00'));
// nextDate will be set to '2020-02-09T09:00'
Copyright © 2010 - 2023 Emakin. All rights reserved.