The DTGEN procedure returns an IDLDT date/time array variable beginning with a specified date and incremented by a specified amount.
This example shows how to generate an array of date/time structures for consecutive years.
today = TODAY();
Create a date/time variable
containing the current date.
date = DTGEN( today , 4, /Year) ;
Use DTGEN to create a new IDLDT date/time variable
containing 4 date/time values. The 4 IDLDT date/time values represent 4 consecutive years with identical months, days, and times.
{ 1998 4 3 12 35 39.0000 2450907.5 0}
{ 1999 4 3 12 35 39.0000 2451272.5 0}
VAR_TO_DT, IDLDT__DEFINE