BIS fnc isLeapYear: Difference between revisions

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


| arma3
|game1= arma3
 
|version1= 1.10
|1.10


|gr1= Math
|gr1= Math
Line 9: Line 8:
|gr2= Environment
|gr2= Environment


| Returns true if given year is a leap year, otherwise false.
|descr= Returns true if given year is a leap year, otherwise false.


| year call [[BIS_fnc_isLeapYear]]
|s1= year call [[BIS_fnc_isLeapYear]]


|p1= year: [[Number]] - a non-decimal number (a.k.a integer)
|p1= year: [[Number]] - a non-decimal number (a.k.a integer)
Line 17: Line 16:
|r1= [[Boolean]]
|r1= [[Boolean]]


|x1= <code>_isLeapYear = 2035 [[call]] [[BIS_fnc_isLeapYear]];</code>
|x1= <sqf>private _isLeapYear = 2035 call BIS_fnc_isLeapYear;</sqf>


|x2= <code>_isLeapYear = 2036 [[call]] [[BIS_fnc_isLeapYear]]; {{cc|2036 is a leap year}}</code>
|x2= <sqf>private _isLeapYear = 2036 call BIS_fnc_isLeapYear; // 2036 is a leap year</sqf>


|seealso= [[date]]
|seealso= [[date]]
}}
}}

Latest revision as of 23:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Returns true if given year is a leap year, otherwise false.
Execution:
call
Groups:
MathEnvironment

Syntax

Syntax:
year call BIS_fnc_isLeapYear
Parameters:
year: Number - a non-decimal number (a.k.a integer)
Return Value:
Boolean

Examples

Example 1:
private _isLeapYear = 2035 call BIS_fnc_isLeapYear;
Example 2:
private _isLeapYear = 2036 call BIS_fnc_isLeapYear; // 2036 is a leap year

Additional Information

See also:
date

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