System.SysUtils.MonthDays

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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++

extern DELPHI_PACKAGE System::StaticArray<System::StaticArray<System::Word, 12>, 2> MonthDays;

Properties

Type Visibility Source Unit Parent
const
variable
public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

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

MonthDays defines a two-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'.

See Also