Skip to content

Calendar.GetToday

Overview

DateTimeOffset Calendar.GetToday ( [ timezone ] )
Returns the current date in the specified time zone.

Arguments

String timezone Specifies the target time zone for current date in "hh:mm" format. Optional, if not specified system timezone information is used.

Remarks

You may use toISOString() method for comparisons on Xml Database. Such as;

date comparison

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

Examples

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

Result is

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

See Also