BIS fnc sunriseSunsetTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.58


| arma3 |= Game name
|gr1= Environment


|1.00|= Game version
|descr= Calculate sunrise and sunset time.
____________________________________________________________________________________________


| <pre>/*
|s1= date call [[BIS_fnc_sunriseSunsetTime]]
Author: Karel Moricky, modified by Killzone_Kid


Description:
|p1= date: [[Array]]  - date in format [[Date]]
Calculate sunrise and sunset time.


Parameter(s):
|r1= [[Array]] of [[Number]] - [sunriseTime, sunsetTime]. Returns special values when the world position is behind the polar cicle: [0,-1] - polar summer (i.e., no sunset), [-1,0] - polar winter (i.e., no sunrise).
ARRAY  - date in format [year,month,day,hour,minute], i.e., standard game date format


Returns:
|x1= <sqf>private _sunriseSunsetTime = date call BIS_fnc_sunriseSunsetTime; // get sunrise/sunset time for the current date</sqf>
ARRAY in format [<sunriseTime:number>,<sunsetTime:number>]
Returns special values when the world position is behind the polar cicle:
[0,-1] - polar summer (i.e., no sunset)
[-1,0] - polar winter (i.e., no sunrise)
*/
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_sunriseSunsetTime]]; --> |= Syntax
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[sunOrMoon]]
}}
}}
<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: Misc|{{uc:sunriseSunsetTime}}]]
[[Category:Functions|{{uc:sunriseSunsetTime}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:sunriseSunsetTime}}]]

Latest revision as of 22:45, 12 July 2022

Hover & click on the images for description

Description

Description:
Calculate sunrise and sunset time.
Execution:
call
Groups:
Environment

Syntax

Syntax:
date call BIS_fnc_sunriseSunsetTime
Parameters:
date: Array - date in format Date
Return Value:
Array of Number - [sunriseTime, sunsetTime]. Returns special values when the world position is behind the polar cicle: [0,-1] - polar summer (i.e., no sunset), [-1,0] - polar winter (i.e., no sunrise).

Examples

Example 1:
private _sunriseSunsetTime = date call BIS_fnc_sunriseSunsetTime; // get sunrise/sunset time for the current date

Additional Information

See also:
sunOrMoon

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