|
Scientific Data Formats: Common Data Format |
|
The CDF_EPOCH_COMPARE function compares two epoch (date and time) values.
Result = CDF_EPOCH_COMPARE(epoch1, epoch2)
Returns 1 if the value of the first epoch is greater (a later date and time) than the second epoch. Returns 0 if the value of the first epoch is the same as the second epoch. Returns -1 if the value of the first epoch is less (earlier date and time) than the second epoch.
An epoch value returned from CDF_EPOCH or CDF_EPOCH16 with the COMPUTE keyword set, or from CDF_VARGET or CDF_VARGET1.
None
CDF_EPOCH, epoch, 2005,6,1,10,18,17,2,/COMPUTE CDF_EPOCH, epoch1, 2005,6,1,10,18,17,2,3,4,5,/COMPUTE IF CDF_EPOCH_COMPARE(epoch,epoch1) EQ 0 THEN $ PRINT, "epoch = epoch1" $ ELSE IF (CDF_EPOCH_COMPARE(epoch,epoch1) EQ 1) THEN $ PRINT, "epoch > epoch1 - epoch is a later date than epoch1" $ ELSE $ ; return value is -1 PRINT, "epoch < epoch1 - epoch1 is a later date than epoch"
IDL Online Help (March 06, 2007)