Gettimedate: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
Mblackwell (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''getdate''' <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>
'''gettimedate''' <sec> <min> <hour> <mday> <mon> <year> <wday> <yday>


Gets the time and date into gamevars:
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
  <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]


A tutorial on how this command can be used can be viewed here: [[How_to_make_a_clock|make an in-game clock]]
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