Home  |  Delphi .net Home  |  System.DateTime  |  DaysInMonth Method
  
DaysInMonth  
Method  
Returns the number of days in the specified month of the specified year.
DateTime Structure
System NameSpace
CF1.  Function DaysInMonth ( Year : Integer; Month : Integer ) : Integer; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
Returns the number of days in the specified month of the specified year.
Notes
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
Microsoft MSDN Links
System
System.DateTime
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  days : Integer;

begin
  days := System.DateTime.DaysInMonth(2000, 2);  // 2000 was a leap year

  Console.WriteLine('Days in February 2000 = {0}', days.ToString);

  Console.ReadLine;
end.
   Days in February 2000 = 29
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author