numberToDate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(43 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| Convert float number to a date. |= Description
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| '''numberToDate''' [year,time] |= Syntax
|game4= arma3
|version4= 0.50


|p1= [year,time]: [[Array]] -  |= PARAMETER1
|gr1= Environment


|p2= |= PARAMETER2
|descr= Convert float number to a date.


|p3= |= PARAMETER3
|s1= [[numberToDate]] [year, time]


| [[Array]] |= RETURNVALUE
|p1= year: [[Number]] - year value, e.g 2035


|p2= time: [[Number]] - year time in range 0..1, from beginning to end of the year (e.g {{hl|0}} is January 1<sup>st</sup> and {{hl|1}} is December 31<sup>st</sup>)


|x1= <code>_date <nowiki>=</nowiki> [[numberToDate]] [2008,0.5324]; //[2008,7,13,7,49]</code>|= EXAMPLE1
|r1= [[Array]] format [[Date]]


____________________________________________________________________________________________
|x1= <sqf>setDate numberToDate [2008, 0.5324]; // sets date to [2008,7,13,7,49]</sqf>


| [[dateToNumber]], [[getNumber]], [[isNumber]], [[parseNumber]], [[playersNumber]] |= SEEALSO
|seealso= [[dateToNumber]] [[getNumber]] [[isNumber]] [[parseNumber]] [[playersNumber]]
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}
<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:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:23, 13 May 2022

Hover & click on the images for description

Description

Description:
Convert float number to a date.
Groups:
Environment

Syntax

Syntax:
numberToDate [year, time]
Parameters:
year: Number - year value, e.g 2035
time: Number - year time in range 0..1, from beginning to end of the year (e.g 0 is January 1st and 1 is December 31st)
Return Value:
Array format Date

Examples

Example 1:
setDate numberToDate [2008, 0.5324]; // sets date to [2008,7,13,7,49]

Additional Information

See also:
dateToNumber getNumber isNumber parseNumber playersNumber

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