Calendar.GetDateTime
Overview¶
Promise<DateTimeOffset> Calendar.GetDateTime ( [relativeDate], [offset] )
Arguments¶
String relativeDate Relative date value. If set to empty or null, offset value is returned.
DateTimeOffset offset Offset date time value. If omitted current date time value is used.
Remarks¶
- Please refer to Relative Date format for more information.
- Relative date expression used to perform date calculation by relative points in time. Expression can be specified as following pattern;
[Amount] Unit, [ [Amount] Unit ], ....
2 Month, 3 Day
Unit | Description | Example | Result |
---|---|---|---|
Minute | Minutes | 5 Minute | 2017-05-02T14:35:00+02:00 |
Hour | Hours | 4 Hour | 2017-05-02T18:35:00+02:00 |
Day | Days | 2 Day | 2017-05-04T14:30:00+02:00 |
BDay | Beginning of Day | 4 BDay | 2017-05-08T00:00:00+02:00 |
EDay | End of Day | EDay | 2017-05-02T23:59:59+02:00 |
Month | Months | 1 Month | 2017-06-02T14:30:00+02:00 |
BMonth | Beginning of Month | 2 BMonth | 2017-07-01T00:00:00+02:00 |
EMonth | End of Month | 1 EMonth | 2017-06-30T23:59:59+02:00 |
Year | Years | 1 Year | 2018-05-02T14:30:00+02:00 |
BYear | Beginning of Year | 2 BYear | 2019-01-01T00:00:00+02:00 |
EYear | End of Year | EYear | 2017-12-31T23:59:59+02:00 |
Examples¶
$Xml.SetValue('Start', $Calendar.GetDateTime('BMonth')); $Xml.SetValue('End', $Calendar.GetDateTime('2 Day, 4 Hour'));