BIS fnc secondsToString: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| tkoh |Game name=
| tkoh


|1.00|Game version=
|1.00


|gr1 = Strings |GROUP1=
|gr1 = Strings


| Convert seconds to formatted string. |DESCRIPTION=
| Convert seconds to formatted string.


| [totalSeconds, format, returnArray] call [[BIS_fnc_secondsToString]] |SYNTAX=
| [totalSeconds, format, returnArray] call [[BIS_fnc_secondsToString]]


|p1= totalSeconds: [[Number]] - time in seconds (see [[time]]) |PARAMETER1=
|p1= totalSeconds: [[Number]] - time in seconds (see [[time]])


|p2= format: [[String]] - (Optional, default "HH:MM:SS") can be one of:
|p2= format: [[String]] - (Optional, default "HH:MM:SS") can be one of:
Line 23: Line 23:
* "SS.MS"
* "SS.MS"
''HH = Hours, MM = Minutes, SS = Seconds, MS = Milliseconds''
''HH = Hours, MM = Minutes, SS = Seconds, MS = Milliseconds''
|PARAMETER2=


|p3= returnArray: [[Boolean]] - (Optional, default false) |PARAMETER3=


| [[String]] or [[Array]] of [[String|Strings]] if ''returnArray'' is set to [[true]] |RETURNVALUE=
|p3= returnArray: [[Boolean]] - (Optional, default false)


|x1= <code>[[hint]] [[format]] ["Hi, it is currently %1.", [<nowiki/>[[time]], "HH:MM"] [[call]] [[BIS_fnc_secondsToString]]];</code> |EXAMPLE1=
| [[String]] or [[Array]] of [[String|Strings]] if ''returnArray'' is set to [[true]]


| [[time]], [[BIS_fnc_showTime]], [[BIS_fnc_timeToString]] |SEEALSO=
|x1= <code>[[hint]] [[format]] ["Hi, it is currently %1.", [<nowiki/>[[time]], "HH:MM"] [[call]] [[BIS_fnc_secondsToString]]];</code>
 
| [[time]], [[BIS_fnc_showTime]], [[BIS_fnc_timeToString]]
}}
}}



Revision as of 23:45, 17 January 2021

Hover & click on the images for description

Description

Description:
Convert seconds to formatted string.
Execution:
call
Groups:
Strings

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"
HH = Hours, MM = Minutes, SS = Seconds, MS = Milliseconds
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_showTimeBIS_fnc_timeToString

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

Bottom Section