BIS fnc calculateDateTime – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Empty accidential import into Discussion page)
Line 1: Line 1:
{{Function|= Comments
____________________________________________________________________________________________


| arma3 |= Game name
|1.86|= Game version
____________________________________________________________________________________________
| <pre>
/************************************************************
Calculate Date
Parameters: [start datetime, time offset (in seconds) or end datetime, time unit]
time unit:
- "s" (default) - seconds
- "m" - minutes
- "h" - hours
- "d" - days
Returns the new datetime if offset is passed or
difference between dates if end datetime is passed
(in seconds)
Example: [date, 3600] call BIS_fnc_CalculateDateTime
Example: [date, 60, "m"] call BIS_fnc_CalculateDateTime
Example: [date, [2035,8,29,11,55], "h"] call BIS_fnc_CalculateDateTime
************************************************************/
#define TIME_FLOAT_CONVERT_DAYS   365
#define TIME_FLOAT_CONVERT_HOURS 8760
#define TIME_FLOAT_CONVERT_MINUTES 525600
#define TIME_FLOAT_CONVERT_SECONDS 31536000
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
| <!-- [] call [[BIS_fnc_CalculateDateTime]]; --> |= Syntax
|p1= |= Parameter 1
| |= Return value
____________________________________________________________________________________________
|x1= <code></code> |=
____________________________________________________________________________________________
| |= See also
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: DateTime|{{uc:CalculateDateTime}}]]
[[Category:Functions|{{uc:CalculateDateTime}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:CalculateDateTime}}]]

Revision as of 10:19, 8 December 2018