MIST getDHMS
From DCS World Wiki - Hoggitworld.com
Revision as of 15:52, 4 January 2019 by Acidictadpole (talk | contribs)
mist.time.getDHMS
Added with: Mist 3.7 |
Description |
Returns a table formatted as {d = day, h = hours, m = minutes, s = seconds} of a given time in seconds. If no value is passed the function logs an error and returns nil. |
Syntax |
table mist.time.getDHMS( number time ) |
Valid Input Values: |
93600 |
Return value: |
table |
Return example: |
{d = 2, h = 2, m = 0, s = 0} |
Usage Examples: |
The following example would be an approximate function to determine the use of illumination flares or bombs.
local date = mist.time.getDHMS(timer.getAbsTime()) if date.h >= 21 or date.h =< 5 then lightBombs = true end
|
Notes: |
Related Functions |
getDate, getDHMS, convertToSec, milToGame |