GetChristmasDay Routines
Returns Christmas Day, for a given Year.

Unit
QESBPCSDateTime

Overloaded Variants
Function GetChristmasDay(const Year: Word): TDateTime;
Function GetChristmasDay(const Year: Integer): TDateTime;
Function GetChristmasDay(const DT: TDateTime): TDateTime;

Declaration
Function GetChristmasDay(const Year: Word): TDateTime;

Parameters
Year the Year to be processed - should be 4 digit, eg 1999.
DT the Date to be processed.

Category
Date/Time Arithmetic Routines
Year Based Arithmetic Routines

Implementation

function GetChristmasDay (const Year: Word): TDateTime;
begin
     Result := OptEncodeDateW (Year, 12, 25);
End;

Declaration
Function GetChristmasDay(const Year: Integer): TDateTime;

Implementation

function GetChristmasDay (const Year: Integer): TDateTime;
begin
     Result := OptEncodeDateI (Year, 12, 25);
End;

Declaration
Function GetChristmasDay(const DT: TDateTime): TDateTime;

Implementation

function GetChristmasDay (const DT: TDateTime): TDateTime;
begin
     Result := GetChristmasDay (OptDate2Year (DT));
End;


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