DatesInSameMonth Function
Returns true if both DateTimes refer to the same Calendar Month, can have different years.

Unit
QESBPCSDateTime

Declaration
Function DatesInSameMonth(const DT1, DT2: TDateTime): Boolean;

Parameters
DT1 First Date/Time to process.
DT2 Second Date/Time to process.

Category
Date/Time Arithmetic Routines
Month Based Arithmetic Routines
Date/Time Comparison

Implementation

function DatesInSameMonth (const DT1, DT2: TDateTime): Boolean;
begin
     Result := Date2Month (DT1) = Date2Month (DT2);
End;


HTML generated by Time2HELP
http://www.time2help.com