BIS fnc setDate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page filling)
m (Some wiki formatting)
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.00


|1.00|= Game version
|gr1= Environment
____________________________________________________________________________________________


| Instantly set date and share it across network. |= Description
|descr= Instantly set date and share it across network with optional transition effect. [[File:BIS_fnc_setDate.jpg|right|300px]]
____________________________________________________________________________________________


| [date, global, transition] call [[BIS_fnc_setDate]] |= Syntax
|s1= [value, global, transition] call [[BIS_fnc_setDate]]


|p1= date: [[Number]] or [[Array]]
|p1= value: [[Number]] or [[Array]] in format [[Date]]
* [[Number]] - number of hours to skip
* [[Number]] - hours to skip. To show exactly ''30 minutes later'' put <sqf inline>30 / 60</sqf>; <sqf inline>0.5</sqf> will show {{hl|29 minutes later}}
* [[Array]] date in format [yyyy, mm, dd, hh, mm] (see [[date]] and [[setDate]]) |= Parameter 1
* [[Array]] in format [[Date]] - date


|p2= global: [[Boolean]] - (Optional, default [[true]]) [[true]] for global execution |= Parameter 2
|p2= global: [[Boolean]] - (Optional, default [[true]]) [[true]] for global execution


|p3= transition: [[Boolean]] (Optional, default [[false]]) [[true]] to show a transition effect instead of an immediate skip |= Parameter 3
|p3= transition: [[Boolean]] (Optional, default [[false]]) [[true]] to show a transition effect instead of an immediate skip


| [[Array]] - the new date |= Return value
|r1= [[Date]] - the new date
____________________________________________________________________________________________


|x1= <code><nowiki>[</nowiki>[2035, 12, 31, 23, 59], [[true]], [[true]]] [[call]] [[BIS_fnc_setDate]];</code> |= Example 1
|x1= <sqf>[[2035, 12, 31, 23, 59], true, true] call BIS_fnc_setDate;</sqf>


|x2= <code>[3.5] [[call]] [[BIS_fnc_setDate]];</code> |= Example 2
|x2= <sqf>[4, true, true] call BIS_fnc_setDate; // skip 4 hours. Same as image in description</sqf>
____________________________________________________________________________________________


| [[date]], [[setDate]], [[skipTime]] |= See also
|x3= <sqf>[30 / 60, true, true] call BIS_fnc_setDate; // skip 30 minutes and show a "30 minutes later" message</sqf>
 
|seealso= [[date]] [[setDate]] [[skipTime]]
}}
}}
<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:Function Group: Environment|{{uc:setDate}}]]
[[Category:Functions|{{uc:setDate}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:setDate}}]]

Latest revision as of 16:53, 21 May 2023

Hover & click on the images for description

Description

Description:
Instantly set date and share it across network with optional transition effect.
BIS fnc setDate.jpg
Execution:
call
Groups:
Environment

Syntax

Syntax:
[value, global, transition] call BIS_fnc_setDate
Parameters:
value: Number or Array in format Date
  • Number - hours to skip. To show exactly 30 minutes later put 30 / 60; 0.5 will show 29 minutes later
  • Array in format Date - date
global: Boolean - (Optional, default true) true for global execution
transition: Boolean (Optional, default false) true to show a transition effect instead of an immediate skip
Return Value:
Date - the new date

Examples

Example 1:
[[2035, 12, 31, 23, 59], true, true] call BIS_fnc_setDate;
Example 2:
[4, true, true] call BIS_fnc_setDate; // skip 4 hours. Same as image in description
Example 3:
[30 / 60, true, true] call BIS_fnc_setDate; // skip 30 minutes and show a "30 minutes later" message

Additional Information

See also:
date setDate skipTime

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