BIS fnc monthDays: 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>")
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma3
|game1= arma3
|version1= 1.10


|1.10
|gr1= Math


|gr1 = Math
|gr2= Environment


|gr2 = Environment
|descr= Returns number of days in given month. Takes in account for leap year.


| Returns number of days in given month. Takes in account for leap year.
|s1= [year, month] call [[BIS_fnc_monthDays]]
 
| [year, month] call [[BIS_fnc_monthDays]]


|p1= year: [[Number]] - a non-decimal number
|p1= year: [[Number]] - a non-decimal number
Line 17: Line 16:
|p2= month: [[Number]] - a non-decimal number in range 1..12
|p2= month: [[Number]] - a non-decimal number in range 1..12


| [[Number]] - number of days in given month
|r1= [[Number]] - number of days in given month


|x1= <code>_daysInThisMonth = [<nowiki/>[[date]] [[select]] 0, [[date]] [[select]] 1] [[call]] [[BIS_fnc_monthDays]];</code>
|x1= <sqf>private _daysInThisMonth = [date select 0, date select 1] call BIS_fnc_monthDays;</sqf>


| [[date]], [[BIS_fnc_showTime]], [[BIS_fnc_secondsToString]]
|seealso= [[date]] [[BIS_fnc_showTime]] [[BIS_fnc_secondsToString]]
}}
}}
[[Category:Functions|{{uc:monthDays}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:monthDays}}]]

Latest revision as of 17:00, 13 July 2022

Hover & click on the images for description

Description

Description:
Returns number of days in given month. Takes in account for leap year.
Execution:
call
Groups:
MathEnvironment

Syntax

Syntax:
[year, month] call BIS_fnc_monthDays
Parameters:
year: Number - a non-decimal number
month: Number - a non-decimal number in range 1..12
Return Value:
Number - number of days in given month

Examples

Example 1:
private _daysInThisMonth = [date select 0, date select 1] call BIS_fnc_monthDays;

Additional Information

See also:
date BIS_fnc_showTime BIS_fnc_secondsToString

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