if IsNewMonth = true then foo else bar; function TFMain.IsNewMonth() : boolean; begin Result := false; if DayOfTheMonth(Now()) = 1 then Result := true; end;