finding # of days in a month
is there a method or function to determine the # of days for a given month
and a given year? thanks in advance.
Re: finding # of days in a month
I don't know your language of choice, but:
Convert your month and year to a form like MM/01/YYYY, then add 1 month,
and get the difference in terms of days.
Given 10 for month, and 2000 for year, take 10/01/2000, and add one
month, using whatever date mathematics you have available. Next, subtract
the dates from each other to return number of days. This can normally be
reduced to one statement.
D. Patrick Hoerter
rich <firstname.lastname@example.org> wrote in message news:email@example.com...
> is there a method or function to determine the # of days for a given month
> and a given year? thanks in advance.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL