Skip to main content

DateTime

Parse a date string into a DateTime object, or get the current time via Host.SystemInfo.getLocalTime().

Methods

MethodReturnsParametersDescription
Host.DateTime(date)objectdate — date string (e.g. "2026/01/01")Parse a date string into a DateTime object

DateTime object properties:

PropertyTypeExampleDescription
yearnumber2026Year
monthnumber5Month (1-based)
daynumber28Day of month
hournumber14Hour (0-23)
minutenumber30Minute
secondnumber15Second
var end = Host.DateTime("2026/01/01");
var now = Host.SystemInfo.getLocalTime();

SystemInfo

Host.SystemInfo provides system-level time access via getLocalTime().

Methods:

MethodReturnsParametersDescription
Host.SystemInfo.getLocalTime()objectnoneGet current local system time as a DateTime object
var now = Host.SystemInfo.getLocalTime();

The returned object has the same properties as Host.DateTime object properties.