All Bundles

Date

Provides date and time functionality

Implements: Compare, Clone, Stringify

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

Constructor

New(day:Int, month:Int, year:Int, hours:Int, mins:Int, secs:Int, gmt:Bool)
Parameters
NameTypeDescription
dayIntday of month
monthIntmonth of year
yearIntyear
hoursInthours
minsIntminutes
secsIntseconds
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

Clone

Clones the object instance

method : public : Clone() ~ System.Time.Date
Return
TypeDescription
Datecloned the object instance

Compare

Compares two dates

method : public : Compare(rhs:System.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

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
Int1-12 month value

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

GetWeekDay

Returns day of the week

method : public : GetWeekDay() ~ Int
Return
TypeDescription
Int0-6 day value

GetWeekDayName

Returns name of the week day

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

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