IT Community - Software Programming, Web Development and Technical Support

calculate the number of days in the current month

This is a discussion on calculate the number of days in the current month within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi all... Can anyone tell me how can i calculate the number of days in the current month. Thanks......


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 02-08-2008, 06:27 AM
itbarota itbarota is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 547
itbarota is on a distinguished road
Default calculate the number of days in the current month

Hi all...


Can anyone tell me how can i calculate the number of days in the current month.

Thanks...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-08-2008, 06:30 AM
Pvinothkumar Pvinothkumar is offline
D-Web Analyst
 
Join Date: Sep 2007
Posts: 237
Pvinothkumar is on a distinguished road
Default Re: calculate the number of days in the current month

Hi all...


function days_in_month (year, month)
{
return 32 - new Date(year, month, 32).getDate();
}

Thanks...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a number of days to a date itbarota HTML, CSS and Javascript Coding Techniques 6 09-23-2008 01:38 AM
Number of days in a month (or last day of a month) itbarota HTML, CSS and Javascript Coding Techniques 2 04-28-2008 08:47 PM
Calculate how many hours per each month itbarota HTML, CSS and Javascript Coding Techniques 1 02-25-2008 09:23 PM
How can I calculate the number of days elapsed between two dates? itbarota HTML, CSS and Javascript Coding Techniques 2 12-19-2007 09:14 PM
How can I calculate someone's age in years, months and days? itbarota HTML, CSS and Javascript Coding Techniques 2 12-18-2007 11:10 PM


All times are GMT -7. The time now is 08:54 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0