Scripts: Javascript :: Date and time functions :: Library Article #14
Developer's Section
Get the number of days for any given month By: Erobo Team Member
|
|||
Using javascript we can determine the number of days for any given month and any given year.
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: |
System Message:
|
If you would like to have your Javascripts published in this section please fill out the form below: |