Gettimedate: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
fix member meanings (we add 1900 to <year>), add value ranges (from C99)
Mblackwell (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
'''getdate''' <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>
'''gettimedate''' <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>


Gets the local time and date into gamevars. The values in brackets denote inclusive ranges that the individual members can take on.
Gets the local time and date into gamevars. The values in brackets denote inclusive ranges that the individual members can take on.

Latest revision as of 16:08, 16 February 2018

gettimedate <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>

Gets the local time and date into gamevars. The values in brackets denote inclusive ranges that the individual members can take on.

<sec>     seconds after the minute [0, 60] (note the possibility of a leap second)
<min>     minutes after the hour [0, 59]
<hour>    hours since midnight [0, 23]
<mday>    day of the month [1,31] (note that it is 1-based)
<mon>     months since January [0, 11]
<year>    years since 0 A.D.
<wday>    days since Sunday [0, 6]
<yday>    days since January 1 [0, 365]

A tutorial on how this command can be used can be viewed here: make an in-game clock