Provides date and time functionality
Implements: Compare, Clone, Stringify
OperationsDefault constructor
New()
Constructor
New(gmt:Bool)
Name | Type | Description |
---|---|---|
gmt | Bool | true of time is in GMT, false for local time zone |
Constructor, set time using Unix time
New(unix_time:Int, gmt:Bool)
Name | Type | Description |
---|---|---|
unix_time | Int | number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC |
gmt | Bool | true of time is in GMT, false for local time zone |
Constructor, sets time to midnight of the given day
New(day:Int, month:Int, year:Int, gmt:Bool)
Name | Type | Description |
---|---|---|
day | Int | day of month |
month | Int | day of year |
year | Int | year |
gmt | Bool | true of time is in GMT, false for local time zone |
Constructor
New(day:Int, month:Int, year:Int, hours:Int, mins:Int, secs:Int, gmt:Bool)
Name | Type | Description |
---|---|---|
day | Int | day of month |
month | Int | month of year |
year | Int | year |
hours | Int | hours |
mins | Int | minutes |
secs | Int | seconds |
gmt | Bool | true of time is in GMT, false for local time zone |
Add days to the date
method : public : AddDays(value:Int) ~ Nil
Name | Type | Description |
---|---|---|
value | Int | days to add |
Add hours to the date
method : public : AddHours(value:Int) ~ Nil
Name | Type | Description |
---|---|---|
value | Int | hours to add |
Add minutes to the date
method : public : AddMinutes(value:Int) ~ Nil
Name | Type | Description |
---|---|---|
value | Int | minutes to add |
Add seconds to the date
method : public : AddSeconds(value:Int) ~ Nil
Name | Type | Description |
---|---|---|
value | Int | seconds to add |
Clones the object instance
method : public : Clone() ~ System.Time.Date
Type | Description |
---|---|
Date | cloned the object instance |
Compares two dates
method : public : Compare(rhs:System.Compare) ~ Int
Name | Type | Description |
---|---|---|
rhs | Compare | compare date |
Type | Description |
---|---|
Int | 0 if equal, -1 if right-hand side i greater, 1 if left-hand side is greater |
Gets the date string
method : public : GetDateString() ~ String
Type | Description |
---|---|
String | date string |
Returns the day
method : public : GetDay() ~ Int
Type | Description |
---|---|
Int | day |
Returns the hours
method : public : GetHours() ~ Int
Type | Description |
---|---|
Int | hours |
Returns the minutes
method : public : GetMinutes() ~ Int
Type | Description |
---|---|
Int | minutes |
Returns the month
method : public : GetMonth() ~ Int
Type | Description |
---|---|
Int | 1-12 month value |
Returns name of the month
method : public : GetMonthName() ~ String
Type | Description |
---|---|
String | name of the month |
Returns the seconds
method : public : GetSeconds() ~ Int
Type | Description |
---|---|
Int | seconds |
Gets the time string
method : public : GetTimeString(is_24hr:Bool) ~ String
Name | Type | Description |
---|---|---|
is_24hr | Bool | true if 24-hour clock, false otherwise |
Type | Description |
---|---|
String | time string |
Get the Unix time, number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC
method : public : GetUnixTime() ~ Int
Returns day of the week
method : public : GetWeekDay() ~ Int
Type | Description |
---|---|
Int | 0-6 day value |
Returns name of the week day
method : public : GetWeekDayName() ~ String
Type | Description |
---|---|
String | name of the week day |
Returns the year
method : public : GetYear() ~ Int
Type | Description |
---|---|
Int | year |
Returns a hash ID for the given class
method : public : HashID() ~ Int
Type | Description |
---|---|
Int | hash ID |
Returns rather time is daylight savings
method : public : IsDaylightSaving() ~ Bool
Type | Description |
---|---|
Bool | true if daylight savings, false otherwise |
Returns rather time is GMT
method : public : IsGmt() ~ Bool
Type | Description |
---|---|
Bool | true if GMT, false otherwise |
Creates a shortened string representation of the date
method : public : ToShortString() ~ String
Type | Description |
---|---|
String | shortened string representation of the date |
Creates a string representation of the date
method : public : ToString() ~ String
Type | Description |
---|---|
String | string representation of the date |