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


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


| arma3 |= Game name
|gr1= Math


|1.00|= Game version
|gr2= Environment
____________________________________________________________________________________________


| <pre>/*
|descr= Returns number of days in given month. Takes in account for leap year.


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


Parameter(s):
|p1= year: [[Number]] - a non-decimal number
_this select 0: SCALAR - year; a non-decimal number
_this select 1: SCALAR - month; a non-decimal number between 1-12


Example:
|p2= month: [[Number]] - a non-decimal number in range 1..12
_days = [2035,7] call BIS_fnc_monthDays;


Returns:
|r1= [[Number]] - number of days in given month
SCALAR - number of days in given month
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x1= <sqf>private _daysInThisMonth = [date select 0, date select 1] call BIS_fnc_monthDays;</sqf>
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_monthDays]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[date]] [[BIS_fnc_showTime]] [[BIS_fnc_secondsToString]]
}}
}}
<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:monthDays}}]]
[[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