Difference between revisions of "ObjectType:time"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
== Members == | == Members == | ||
− | *[[DataType: | + | *[[DataType:intptr|intptr]] '''Hour''': Hour of the day (0-23) |
− | *[[DataType: | + | *[[DataType:intptr|intptr]] '''Minute''': Minute of the hour (0-59) |
− | *[[DataType: | + | *[[DataType:intptr|intptr]] '''Second''': Second of the minute (0-59) |
*[[DataType:int|int]] '''DayOfWeek''': Day of the week (1-7) | *[[DataType:int|int]] '''DayOfWeek''': Day of the week (1-7) | ||
− | *[[DataType: | + | *[[DataType:intptr|intptr]] '''DayOfWeekPtr''': Day of the week (0-6) - Mainly useful for *setting* |
+ | *[[DataType:intptr|intptr]] '''Day''': Day of the month (1-31 depending on the month) | ||
*[[DataType:int|int]] '''Month''': Month of the year (1-12) | *[[DataType:int|int]] '''Month''': Month of the year (1-12) | ||
+ | *[[DataType:intptr|intptr]] '''MonthPtr''': Month of the year (0-11) - Mainly useful for *setting* | ||
*[[DataType:int|int]] '''Year''': Year | *[[DataType:int|int]] '''Year''': Year | ||
+ | *[[DataType:intptr|intptr]] '''YearPtr''': Year-1900 (e.g. 0 is 1900, 100 is 2000) - Mainly useful for *setting* | ||
*[[DataType:string|string]] '''Time12''': Time in hh:mm:ss given in 12-hour format | *[[DataType:string|string]] '''Time12''': Time in hh:mm:ss given in 12-hour format | ||
*[[DataType:string|string]] '''Time24''': Time in hh:mm:ss given in 24-hour format | *[[DataType:string|string]] '''Time24''': Time in hh:mm:ss given in 24-hour format | ||
Line 14: | Line 17: | ||
*[[DataType:bool|bool]] '''Night''': TRUE if current time is after 7pm and before 7am | *[[DataType:bool|bool]] '''Night''': TRUE if current time is after 7pm and before 7am | ||
*[[DataType:int|int]] '''SecondsSinceMidnight''': Number of seconds since midnight | *[[DataType:int|int]] '''SecondsSinceMidnight''': Number of seconds since midnight | ||
+ | *[[DataType:int|int]] '''Timestamp''': Number of seconds since epoch (standard UNIX timestamp) | ||
== Methods == | == Methods == | ||
+ | *'''Set['''timestamp''']''': Sets the value based on the given timestamp (standard UNIX timestamp, number of seconds since epoch) | ||
+ | *'''Update''': Updates the type after setting an individual member (NOT needed when using the Set method) | ||
== Returns == | == Returns == | ||
Same as '''Time24''' | Same as '''Time24''' | ||
− | == | + | == Declaring time Variables == |
+ | |||
+ | == Setting time Values == | ||
+ | |||
+ | == time Math == | ||
+ | |||
+ | == Comparing time Values == | ||
== See Also == | == See Also == | ||
* [[LavishScript:Data Types|Data Types]] | * [[LavishScript:Data Types|Data Types]] |
Revision as of 22:07, 10 May 2005
Contents
Description
Members
- intptr Hour: Hour of the day (0-23)
- intptr Minute: Minute of the hour (0-59)
- intptr Second: Second of the minute (0-59)
- int DayOfWeek: Day of the week (1-7)
- intptr DayOfWeekPtr: Day of the week (0-6) - Mainly useful for *setting*
- intptr Day: Day of the month (1-31 depending on the month)
- int Month: Month of the year (1-12)
- intptr MonthPtr: Month of the year (0-11) - Mainly useful for *setting*
- int Year: Year
- intptr YearPtr: Year-1900 (e.g. 0 is 1900, 100 is 2000) - Mainly useful for *setting*
- string Time12: Time in hh:mm:ss given in 12-hour format
- string Time24: Time in hh:mm:ss given in 24-hour format
- string Date: Date in mm/dd/yyyy
- bool Night: TRUE if current time is after 7pm and before 7am
- int SecondsSinceMidnight: Number of seconds since midnight
- int Timestamp: Number of seconds since epoch (standard UNIX timestamp)
Methods
- Set[timestamp]: Sets the value based on the given timestamp (standard UNIX timestamp, number of seconds since epoch)
- Update: Updates the type after setting an individual member (NOT needed when using the Set method)
Returns
Same as Time24