I have a requirement to generate a report (tabular view) which displays number of days by Month from Start Date to End Date. Also, total number of days that fall in the range in the corresponding year.
Start Date: 02/15/2007
End Date: 08/22/2010
Report should be as displayed in the attached text file.
It would not be right for us to do your assignment for you.
You have two problems here.
- How to get the date information
- How to display the information on the page
As far as the date information is concerned, here is the information relating to dates:
You can get the number of days in a certain month, with for example the following:
new Date(year, month, 0).getDate();