Skip to content

GetToday

Returns the current date and time in the specified time zone.

1
myCalendar.GetToday(timeZone: string):DateTimeOffset

Parameters

string timeZone
    Specifies the target time zone for the current date in "hh:mm" format. Optional. If not specified, UTC time zone information is used.

Returns

A new DateTimeOffset value representing the current date and time in the specified time zone.

Remarks

You may use the toISOString() method for comparisons in the XML database, such as:

Date comparison:

1
$Calendar.GetToday('').toISOString();

Example

1
2
$Xml.SetValue('Date1', $Calendar.GetToday(''));
$Xml.SetValue('Date2', $Calendar.GetToday('02:00'));

Example

1
2
<Date1>2017-01-25T16:04:40.5625645Z</Date1>
<Date2>2017-01-25T18:04:40.5625645+02:00</Date2>

See Also