The IDLDT__DEFINE procedure (note the double underscore) is invoked automatically by IDL when one of the date/time routines--listed below in " See Also "--references the named structure, IDLDT. IDLDT__DEFINE also automatically creates a number of related system variables, initializing them to their default values.
NOTE: Generally speaking, you should have no reason to explicitly set the IDLDT structure by calling IDLDT__DEFINE. This routine is included in the documentation mainly for reference.
The IDLDT structure includes the following fields:
** Structure IDLDT, 8 tags, length=32:
For more information, see Automatic Structure Definition .
The base date for calculations. !DT_BASE is an IDLDT structure initially set to
{IDLDT, -4713, 1, 1, 12, 0, 0, 0.d, 0}.
A 50 element array indicating holidays, for exclusion from certain calculations. No holidays are installed by default.
A byte array indicating which days of the week are weekend days, to be excluded from certain calculations. No weekends are defined by default,
e.g. !WEEKEND_LIST = byte([0, 0, 0, 0, 0, 0, 0])
An array of strings, giving the names of the days of the week:
["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
An array of strings, giving the names of the months:
["January", "February", "March", "April", "May", $
"June", "July", "August", "September", $
"October", "November", "December" ]
The IDLDT structure is created and initialized by calling IDLDT__DEFINE. Many of the date and time routines automatically invoke IDLDT__DEFINE when you call them.
For more information about structures, see Structures .
day = TODAY() ;
Return the current date and time (using the TODAY function) in an IDLDT structure named
day
;
.
{ 1998 3 6 15 6 27.0000 2450879.6 0}
HELP, day, /STRUCTURE ; ;Show how each field of the variable day; is defined.
** Structure IDLDT, 8 tags, length=32:
HELP, {IDLDT}, /STRUCTURE ; Show how each field of IDLDT is initialized.
** Structure IDLDT, 8 tags, length=32:
DAY_NAME , DAY_OF_WEEK , DAY_OF_YEAR , DT_ADD , DT_SUBTRACT , DT_TO_VAR , JUL_TO_DT , SEC_TO_DT , STR_TO_DT , TODAY , VAR_TO_DT .