BIS fnc calculateDateTime: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - " |s1=[" to " |s1= [") |
||
(One intermediate revision by the same user not shown) | |||
Line 8: | Line 8: | ||
|descr= Returns the end datetime if an offset is passed, or the offset between start and end dates. | |descr= Returns the end datetime if an offset is passed, or the offset between start and end dates. | ||
|s1=[startDate, endDateOrOffset, timeUnit] call [[BIS_fnc_calculateDateTime]] | |s1= [startDate, endDateOrOffset, timeUnit] call [[BIS_fnc_calculateDateTime]] | ||
|p1= startDate: [[Array]] in [[Date]] format - (Optional, default [[date]]) | |p1= startDate: [[Array]] in [[Date]] format - (Optional, default [[date]]) | ||
Line 30: | Line 30: | ||
</sqf> | </sqf> | ||
|seealso= [[date]] [[setDate]] | |seealso= [[date]] [[setDate]] [[BIS_fnc_setDate]] | ||
}} | }} |
Latest revision as of 23:11, 12 July 2022
Description
- Description:
- Returns the end datetime if an offset is passed, or the offset between start and end dates.
- Execution:
- call
- Groups:
- Environment
Syntax
- Syntax:
- [startDate, endDateOrOffset, timeUnit] call BIS_fnc_calculateDateTime
- 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:
- Date or Number
Examples
- Example 1:
Additional Information
- See also:
- date setDate BIS_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