Previous Page | Next Page

Functions and CALL Routines

HOLIDAY Function

Returns a SAS date value of a specified holiday for a specified year.
Category: Date and Time

See Also


HOLIDAY('holiday', year)



is a character constant, variable, or expression that specifies one of the values listed in the following table.

Values for holiday can be in uppercase or lowercase.

Holidays Recognized By SAS
Holiday Value Description Date Celebrated
BOXING Boxing Day December 26
CANADA Canadian Independence Day July 1
CANADAOBSERVED Canadian Independence Day observed July 1, or July 2 if July 1 is a Sunday
CHRISTMAS Christmas December 25
COLUMBUS Columbus Day 2nd Monday in October
EASTER Easter Sunday date varies
FATHERS Father's Day 3rd Sunday in June
HALLOWEEN Halloween October 31
LABOR Labor Day 1st Monday in September
MLK Martin Luther King, Jr. 's birthday 3rd Monday in January beginning in 1986
MEMORIAL Memorial Day last Monday in May (since 1971)
MOTHERS Mother's Day 2nd Sunday in May
NEWYEAR New Year's Day January 1
THANKSGIVING U.S. Thanksgiving Day 4th Thursday in November
THANKSGIVINGCANADA Canadian Thanksgiving Day 2nd Monday in October
USINDEPENDENCE U.S. Independence Day July 4
USPRESIDENTS Abraham Lincoln's and George Washington's birthdays observed 3rd Monday in February (since 1971)
VALENTINES Valentine's Day February 14
VETERANS Veterans Day November 11
VETERANSUSG Veterans Day - U.S. government-observed U.S. government-observed date for Monday-Friday schedule
VETERANSUSPS Veterans Day - U.S. post office observed U.S. government-observed date for Monday-Saturday schedule (U.S. Post Office)
VICTORIA Victoria Day Monday on or preceding May 24


is a numeric constant, variable, or expression that specifies a four-digit year. If you use a two-digit year, then you must specify the YEARCUTOFF= system option.


The HOLIDAY function computes the date on which a specific holiday occurs in a specified year. Only certain common U.S. and Canadian holidays are defined for use with this function. (See Holidays Recognized By SAS for a list of valid holidays.)

The HOLIDAY function returns a SAS date value. To convert the SAS date value to a calendar date, use any valid SAS date format, such as the DATE9. format.


In some cases, the HOLIDAY function and the NWKDOM function return the same result. For example, the statement HOLIDAY('THANKSGIVING', 2007); returns the same value as NWKDOM(4, 5, 11, 2007); .

In other cases, the HOLIDAY function and the MDY function return the same result. For example, the statement HOLIDAY('CHRISTMAS', 2007); returns the same value as MDY(12, 25, 2007); .


The following examples give these results:

SAS Statements Results
thanks = holiday('thanksgiving', 2007);
format thanks date9.;
put thanks;
boxing = holiday('boxing', 2007);
format boxing date9.;
put boxing;
easter = holiday('easter', 2007);
format easter date9.;
put easter;
canada = holiday('canada', 2007);
format canada date9.;
put canada;
fathers = holiday('fathers', 2007);
format fathers date9.;
put fathers;
valentines = holiday('valentines', 2007);
format valentines date9.;
put valentines;
victoria = holiday('victoria', 2007);
format victoria date9.;
put victoria;

See Also


NWKDOM Function

MDY Function

Previous Page | Next Page | Top of Page