PV-WAVE Foundation > Reference Guide > C Routines > CREATE_HOLIDAYS Procedure
CREATE_HOLIDAYS Procedure
Standard Library procedure that creates the system variable !Holiday_List, which is used in calculating Date/Time compression.
Usage
CREATE_HOLIDAYS, dt_list
Input Parameters
dt_list—A Date/Time variable containing one or more days to be specified as holidays.
Keywords
None.
Discussion
The result is stored in the system variable !Holiday_List, a 50-element Date/Time array. !Holiday_List is used in calculating Date/Time compressions for functions that take the Compress keyword. For instance, the functions DT_SUBTRACT, DT_ADD, and DT_DURATION can take the Compress keyword which, if set, will exclude holidays from their results. In addition, the PLOT procedure uses the Compress keyword to exclude holidays from a plot.
Example1
The following commands define !Holiday_List to contain the dates for Christmas and New Years:
holidays = STR_TO_DT(['12-25-2010', '1-1-2010'], Date_Fmt=1)
CREATE_HOLIDAYS, holidays
PRINT, !Holiday_List(0:1)
; PV-WAVE prints:
;{    2010  12  25   0   0      0.00000       94335.000   0}
;{    2010   1   1   0   0      0.00000       93977.000   0}
Example 2
CREATE_HOLIDAYS, STR_TO_DT('04-july-2010', Date_Fmt=4)
PRINT, !Holiday_List(0)
;{    2010   7   4   0   0      0.00000       94161.000   0}
See Also