BIS fnc calculateDateTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ :\\\-\/|()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ")
Line 5: Line 5:
|1.86
|1.86


|gr1 = Environment
|gr1= Environment


| Returns the end datetime if an offset is passed, or the offset between start and end dates.
| Returns the end datetime if an offset is passed, or the offset between start and end dates.

Revision as of 12:47, 11 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Environment

Syntax

Syntax:
Syntax needed
Parameters:
startDate: Array in Date format - (Optional, default date)
endDateOrOffset: Array in Date format or Number - (Optional, default date) either the end date of the period to calculate, or time in seconds from startDate
timeUnit: String - (Optional, default "s") one of:
  • "s" - seconds
  • "m" - minutes
  • "h" - hours
  • "d" - days
Return Value:
Return value needed

Examples

Example 1:
[date, 3600] call BIS_fnc_calculateDateTime; // returns date in 3600 seconds (60min, 1h) Example: [date, 60, "m"] call BIS_fnc_calculateDateTime; // returns date in 60 minutes (1h) Example: [[2035,8,28,11,55], [2035,8,29,11,55], "h"] call BIS_fnc_calculateDateTime; // returns 24

Additional Information

See also:
datesetDateBIS_fnc_setDate

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note