RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.MonthDays Constant

Defines the number of days in each month for normal and leap years.

Pascal
MonthDays: array [Boolean] of TDayTable = ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31), (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));
C++
array [Boolean] of TDayTable MonthDays = ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31), (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31));

MonthDays defines a 2 dimensional array of TDayTable values. Namely, an array of two sets of 12 words. The first set holds the number of days in each month in a normal year, the second set the number in a leap year.  

Use MonthDays[IsLeapYear(Y), M] to find the number of days in Year 'Y', month 'M'. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!