|Get the number of days for any given month
By: Erobo Team Member
Here is a simple script that gives you the number of days of a current month.
The function getNumDaysMonth takes as input the year and the month number and
returns the current number of days for that particular month. The script itself
works by calculating the type of year (leap-year or non-leap year) given a month using the remainder operation.
it selects the number of days from several predefined arrays.
See other Scripts in Date and time functions
Submit Your Scripts:
the form below: