Changeset 436 for trunk/SRC/Calendar/caldat.pro
- Timestamp:
- 06/24/10 12:28:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/caldat.pro
r371 r436 59 59 ; Sebastien Masson, May 2006, add different calendar with key_caltype 60 60 ; (variable of the common file cm_4cal) 61 ; 62 ; CT, Nov 2006: For Hour/Min/Sec, tweak the input to make sure hours 63 ; and minutes are correct. Restrict hours to 0-23 & min to 0-59. 61 64 ; 62 65 ; @version … … 177 180 ; 178 181 ; see if we need to do hours, minutes, seconds 179 IF (nParam GT 4) THEN BEGIN 180 fraction = julian + 0.5d - TEMPORARY(julLong) 181 hour = floor(fraction * 24d) 182 fraction = TEMPORARY(fraction) - hour/24d 183 minute = floor(fraction*1440d) 184 second = (TEMPORARY(fraction) - minute/1440d) * 86400d 185 ENDIF 182 IF (nParam GT 4) THEN BEGIN 183 fraction = julian + 0.5d - julLong 184 eps = 1d-12 > 1d-12*ABS(Temporary(julLong)) 185 hour = 0 > Floor(fraction * 24d + eps) < 23 186 fraction -= hour/24d 187 minute = 0 > Floor(fraction*1440d + eps) < 59 188 second = 0 > (TEMPORARY(fraction) - minute/1440d)*86400d 189 ENDIF 186 190 187 191 ; if julian is an array, reform all output to correct dimensions
Note: See TracChangeset
for help on using the changeset viewer.