BIS fnc secondsToString: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Function|= Comments | {{Function|= Comments | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 8: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Convert seconds to formatted string. |= Description | ||
____________________________________________________________________________________________ | |||
| [totalSeconds, format, returnArray] call [[BIS_fnc_secondsToString]] |= Syntax | |||
|p1= totalSeconds: [[Number]] - time in seconds (see [[time]]) |= Parameter 1 | |||
| | |p2= format: [[String]] - (Optional, default "HH:MM:SS") can be one of: | ||
* "HH" | |||
* "HH:MM" | |||
* "HH:MM:SS" | |||
* "HH:MM:SS.MS" | |||
* "MM" | |||
* "MM:SS" | |||
* "MM:SS.MS" | |||
* "SS.MS" | |||
''HH = Hours, MM = Minutes, SS = Seconds, MS = Milliseconds'' | |||
|= Parameter 2 | |||
| | |p3= returnArray: [[Boolean]] - (Optional, default false) |= Parameter 3 | ||
| |= Return value | | [[String]] or [[Array]] of [[String|Strings]] if ''returnArray'' is set to [[true]] |= Return value | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code></code> |= | |x1= <code>[[hint]] [[format]] ["Hi, it is currently %1.", <nowiki>[</nowiki>[[time]], "HH:MM"] [[call]] [[BIS_fnc_secondsToString]]];</code> |= Example 1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= See also | | [[time]], [[BIS_fnc_showTime]] |= See also | ||
}} | }} | ||
Revision as of 23:57, 26 April 2018
Description
- Description:
- Convert seconds to formatted string.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [totalSeconds, format, returnArray] call BIS_fnc_secondsToString
- Parameters:
- totalSeconds: Number - time in seconds (see time)
- format: String - (Optional, default "HH:MM:SS") can be one of:
- "HH"
- "HH:MM"
- "HH:MM:SS"
- "HH:MM:SS.MS"
- "MM"
- "MM:SS"
- "MM:SS.MS"
- "SS.MS"
- returnArray: Boolean - (Optional, default false)
- Return Value:
- String or Array of Strings if returnArray is set to true
Examples
- Example 1:
hint format ["Hi, it is currently %1.", [time, "HH:MM"] call BIS_fnc_secondsToString];
Additional Information
- See also:
- timeBIS_fnc_showTime
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