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