RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.MonthDays Constant

An array specifying how many days are in a month.

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));

SysUtils

The MonthDays array can be used to quickly find the number of days in a month:

MonthDays[IsLeapYear(Y), M]

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!