BIS fnc sunriseSunsetTime: Difference between revisions
Jump to navigation
Jump to search
m (example formatting and see also) |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma3 |Game name= | | arma3 |Game name= | ||
Line 8: | Line 7: | ||
|gr1 = Environment |GROUP1= | |gr1 = Environment |GROUP1= | ||
| Calculate sunrise and sunset time. |DESCRIPTION= | | Calculate sunrise and sunset time. |DESCRIPTION= | ||
| [year,month,day,hour,minute] call [[BIS_fnc_sunriseSunsetTime]]; |SYNTAX= | | [year,month,day,hour,minute] call [[BIS_fnc_sunriseSunsetTime]]; |SYNTAX= | ||
Line 18: | Line 15: | ||
| [[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). |RETURNVALUE= | | [[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). |RETURNVALUE= | ||
|x1= <code>_sunriseSunsetTime = [[date]] [[call]] [[BIS_fnc_sunriseSunsetTime]];{{cc|// get sunrise/sunset time for the current date}}</code> |= | |x1= <code>_sunriseSunsetTime = [[date]] [[call]] [[BIS_fnc_sunriseSunsetTime]];{{cc|// get sunrise/sunset time for the current date}}</code> |= | ||
| [[sunOrMoon]] |SEEALSO= | | [[sunOrMoon]] |SEEALSO= |
Revision as of 23:52, 16 January 2021
Description
- Description:
- Calculate sunrise and sunset time.
- Execution:
- call
- Groups:
- Environment
Syntax
- Syntax:
- [year,month,day,hour,minute] call BIS_fnc_sunriseSunsetTime;
- Parameters:
- Array - date in format [year,month,day,hour,minute], i.e., standard game date format
- Return Value:
- 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).
Examples
- Example 1:
_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