Skip to main content
A class for representing a time span.

Constructors

TimeSpan

Initializes a new instance of the TimeSpan class.

Methods

addDay(Integer)

Adds the given number of days to the currently set time span.
Returns: CRMScript.Global.Void

addHour(Integer)

Adds the given number of hours to the currently set time span.
Returns: CRMScript.Global.Void

addMin(Integer)

Adds the given number of minutes to the currently set time span.
Returns: CRMScript.Global.Void

addSec(Integer)

Adds the given number of seconds to the currently set time span.
Returns: CRMScript.Global.Void

addYear(Integer)

Adds the given number of years to the currently set time span.
Returns: CRMScript.Global.Void

getDay()

Returns the day field of the time span as an integer.
Returns: CRMScript.Global.Integer - Day field as an integer.

getHour()

Returns the hour field of the time span as an integer.
Returns: CRMScript.Global.Integer

getMin()

Returns the minute field of the time span as an integer.
Returns: CRMScript.Global.Integer

getSec()

Returns the seconds field of the time span as an integer.
Returns: CRMScript.Global.Void

getYear()

Returns the year field of the time span as an integer.
Returns: CRMScript.Global.Integer

isNegative()

Checks if this is a negative time span.
Returns: CRMScript.Global.Bool - True if this is a negative time span; otherwise, false.

set(Integer,Integer,Integer,Integer,Integer)

Initializes a time span object.
Returns: CRMScript.Global.Void

setNegative(Bool)

Positive time span is default, but if you add a negative number of years/days/hours/minutes/seconds, you may get a negative times pan.
Returns: CRMScript.Global.Void

toDays()

Returns the time span as a number of days. A one year time span will return 365.
Returns: CRMScript.Global.Integer

toHours()

Returns the time span as a number of hours. A one day time span will return 24.
Returns: CRMScript.Global.Integer

toMinutes()

Returns the time span as a number of minutes. A one hour time span will return 60.
Returns: CRMScript.Global.Integer

toSeconds()

Returns the time span as a number of seconds. A one minute time span will return 60.
Returns: CRMScript.Global.Integer

toString(Integer,Integer,Integer,Bool)

Returns the time span as a string representation, on given format and language.
Returns: CRMScript.Global.String - A string representation of the time span, on the given format and in the given language. Example: