Gettimedate: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
New page: Gets the time and date into gamevars: <pre> getdate <sec> <min> <hour> <mday> <mon> <year> <wday> <yday> sec seconds after the minute min minutes after the hour hour hours sin...
 
Mblackwell (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Gets the time and date into gamevars:
'''gettimedate''' <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>


<pre>
Gets the local time and date into gamevars. The values in brackets denote inclusive ranges that the individual members can take on.
getdate <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>


sec    seconds after the minute
<sec>     seconds after the minute [0, '''60'''] (note the possibility of a leap second)
min    minutes after the hour
<min>     minutes after the hour [0, 59]
hour    hours since midnight
<hour>   hours since midnight [0, 23]
mday    day of the month
<mday>   day of the month '''[1,31]''' (note that it is 1-based)
mon    months since January
<mon>     months since January [0, 11]
year    years since 1900
<year>   years since 0 A.D.
wday    days since Sunday
<wday>   days since Sunday [0, 6]
yday    days since January
<yday>   days since January 1 [0, 365]
</pre>
 
A tutorial on how this command can be used can be viewed here: [[How_to_make_a_clock|make an in-game clock]]


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]

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