Date.getDaysInMonth()
Description
The Date.getDaysInMonth() API returns the number of days in a specific month of a specific year.
Parameters
Year - The four-digit year.
Index of month - The zero-based month index, where January = 0 and December = 11.
Return Value
The number of days in that month.
Example
pjs.define("num", { type: 'zoned', length: 7, decimals: 2 });
// Month index 1 is February.
num = Date.getDaysInMonth(2016, 1);
return num;
// 29 (February 2016 has 29 days)