Home

Date

Provides date and time functionality

Implements: Compare

Operations

New

Default constructor

New()

Constructor

New(gmt:Bool)
Parameters
NameTypeDescription
gmtBooltrue of time is in GMT, false for system time zone

Constructor, sets time to midnight of the given day

New(day:Int, month:Int, year:Int, gmt:Bool)
Parameters
NameTypeDescription
dayIntday of month
monthIntday of year
yearIntyear
gmtBooltrue of time is in GMT, false for system time zone

AddDays

Add days to the date

method : public : AddDays(value:Int) ~ Nil
Parameters
NameTypeDescription
valueIntdays to add

AddHours

Add hours to the date

method : public : AddHours(value:Int) ~ Nil
Parameters
NameTypeDescription
valueInthours to add

AddMinutes

Add minutes to the date

method : public : AddMinutes(value:Int) ~ Nil
Parameters
NameTypeDescription
valueIntminutes to add

AddSeconds

Add seconds to the date

method : public : AddSeconds(value:Int) ~ Nil
Parameters
NameTypeDescription
valueIntseconds to add

Compare

Compares two dates

method : public : Compare(rhs:Compare) ~ Int
Parameters
NameTypeDescription
rhsComparecompare date

Return
TypeDescription
Int0 if equal, -1 if right-hand side i greater, 1 if left-hand side is greater

GetDay

Returns the day

method : public : GetDay() ~ Int
Return
TypeDescription
Intday

GetDayName

Returns name of the day

method : public : GetDayName() ~ String
Return
TypeDescription
Stringname of the day

GetHours

Returns the hours

method : public : GetHours() ~ Int
Return
TypeDescription
Inthours

GetMinutes

Returns the minutes

method : public : GetMinutes() ~ Int
Return
TypeDescription
Intminutes

GetMonth

Returns the month

method : public : GetMonth() ~ Int
Return
TypeDescription
Intmonth

GetMonthName

Returns name of the month

method : public : GetMonthName() ~ String
Return
TypeDescription
Stringname of the month

GetSeconds

Returns the seconds

method : public : GetSeconds() ~ Int
Return
TypeDescription
Intseconds

GetYear

Returns the year

method : public : GetYear() ~ Int
Return
TypeDescription
Intyear

HashID

Returns a hash ID for the given class

method : public : HashID() ~ Int
Return
TypeDescription
Inthash ID

ToShortString

Creates a shortened string representation of the date

method : public : ToShortString() ~ String
Return
TypeDescription
Stringshortened string representation of the date

ToString

Creates a string representation of the date

method : public : ToString() ~ String
Return
TypeDescription
Stringstring representation of the date