Function GetDays(AYear,AMonth:Integer):Integer;
begin
Case AMonth of
1 , 3 , 5 , 7 , 8 , 10 , 12 : Result:= 31 ;
4 , 6 , 9 , 11 : Result:= 30 ;
2 : Begin
If IsLeapYear(AYear) Then
Result:= 29
Else
Result:= 28 ;
End;
Else
Result:= 0 ;
end ;
begin
Case AMonth of
1 , 3 , 5 , 7 , 8 , 10 , 12 : Result:= 31 ;
4 , 6 , 9 , 11 : Result:= 30 ;
2 : Begin
If IsLeapYear(AYear) Then
Result:= 29
Else
Result:= 28 ;
End;
Else
Result:= 0 ;
end ;