The date.getDaysInMonth() method returns the number of days of a month in a date.
Return Value
The number of days in the month of the date
Example
Code Block | ||
---|---|---|
| ||
pjs.define("date", { type: 'date', initValue: '2017-12-01'});
pjs.define("num", { type: "zoned", length: 7, decimals: 2});
num = date.getDaysInMonth();
return num;
// num is 31 (January has 31 days) |