Skip to main content
A class for representing time as objects. Time is a complex data type representing the time of the day in hours, minutes, and seconds. The default value is now. ISO 8601 uses the 24-hour clock system. Format: hh:mm:ss

Constructors

Time()

Default constructor.

Time(Time)

Pass a value to copy into a new object.

Time(String)

Pass a String containing a timestamp on format HH:MM:SS. The constructor will parse the text and create a Time object.

Methods

toString()

Converts a Time value to its string representation. One of the most frequently used methods, typically when you are going to output something.
Returns: CRMScript.Global.String Example:

setHour(Integer)

Overwrites the current time and sets hours to the given number [0-23].
Returns: CRMScript.Global.Void Example:

setMin(Integer)

Overwrites the current time and sets minutes to the given number [0-59].
Returns: CRMScript.Global.Void Example:

setSec(Integer)

Overwrites the current time and sets seconds to the given number [0-59].
Returns: CRMScript.Global.Void Example:

getHour()

Returns the hour portion of the time as an Integer.
Returns: CRMScript.Global.Integer Example:

getMin()

Returns the minutes portion of the time as an Integer.
Returns: CRMScript.Global.Integer Example:

getSec()

Returns the seconds portion of the time as an Integer.
Returns: CRMScript.Global.Integer Example:

isNull()

Returns true if it has no value and false if it does.
Returns: CRMScript.Global.Bool
A NULL/NUL/NIL Time is different from zero, in that it is conceptually without a value.
Example: