Changeset 495 for trunk/SRC/Calendar/jul2date.pro
- Timestamp:
- 04/17/14 10:49:43 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/jul2date.pro
r371 r495 14 14 ; Set this keyword equal to a named variable that will receive a 15 15 ; longword integer or longword integer array representing the number of 16 ; the desired month (1 = January, ..., 12 = December). 16 ; the desired month (1 = January, ..., 12 = December). 17 17 ; 18 18 ; @keyword DAY 19 19 ; Set this keyword equal to a named variable that will receive a 20 20 ; longword integer or longword integer array representing the number of 21 ; the day of the month (1-31). 21 ; the day of the month (1-31). 22 22 ; 23 23 ; @keyword YEAR 24 24 ; Set this keyword equal to a named variable that will receive a 25 25 ; longword integer or longword integer array representing the number of 26 ; the desired year (e.g., 1994). 26 ; the desired year (e.g., 1994). 27 27 ; 28 28 ; @keyword HOUR 29 29 ; Set this keyword equal to a named variable that will receive a 30 30 ; longword integer or longword integer array representing the number of 31 ; the hour of the day (0-23). 32 ; 31 ; the hour of the day (0-23). 32 ; 33 33 ; @keyword MINUTE 34 34 ; Set this keyword equal to a named variable that will receive a 35 35 ; longword integer or longword integer array representing the number of 36 ; the minute of the hour (0-59). 37 ; 36 ; the minute of the hour (0-59). 37 ; 38 38 ; @keyword SECOND 39 39 ; Set this keyword equal to a named variable that will receive a … … 45 45 ; the date: longword integer with yyyymmdd format or double-precision 46 46 ; floating-point with yyyymmdd.xx where xx is the fraction of the day 47 ; (xx=0 at 0am and 5 at 12am) 47 ; (xx=0 at 0am and 5 at 12am) 48 48 ; 49 49 ; @restrictions 50 50 ; Input param must be longword integer or double-precision floating-point 51 ; 51 ; 52 52 ; @examples 53 53 ; … … 76 76 sztype = size(jday, /type) 77 77 IF sztype NE 3 AND sztype NE 5 AND sztype LT 13 THEN BEGIN 78 dummy = report('Beware of input type, julian date must be long or double')78 dummy = report('Beware of input type, Julian date must be long or double') 79 79 stop 80 80 ENDIF … … 82 82 caldat, jday, month, day, year, hour, minute, second 83 83 ; 84 res = (10000L*year + 100L*month + day)*(year GE 0) $85 +( 10000L*year - 100L*month - day)*(year LT 0)84 res = (10000L * year + 100L * month + day) * (year GE 0) $ 85 + (10000L * year - 100L * month - day) * (year LT 0) 86 86 ; 87 87 IF sztype NE 5 THEN return, long(res) $ 88 ELSE return, double(res) + (hour / 24.0d0) + (minute /1440.0d0) + (second / 86400.0d0)88 ELSE return, double(res) + (hour / 24.0d0) + (minute / 1440.0d0) + (second / 86400.0d0) 89 89 90 90 end
Note: See TracChangeset
for help on using the changeset viewer.