Changeset 198 for trunk/SRC/ToBeReviewed/WIDGET
- Timestamp:
- 12/01/06 12:05:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro
r181 r198 261 261 mots = str_sep(value, ' ') 262 262 unite = mots[0] 263 unite = strlowcase(unite) 264 IF strpos(unite, 's', strlen(unite)-1) NE -1 THEN unite = strmid(unite, 0, strlen(unite)-1) 265 IF strpos(unite, 'julian_') NE -1 THEN unite = strmid(unite, 7) 263 266 err = 0 264 IF unite NE 'second s' AND unite NE 'hours' AND unite NE 'days' $265 AND unite NE 'month s' AND unite NE 'years' THEN BEGIN267 IF unite NE 'second' AND unite NE 'hour' AND unite NE 'day' $ 268 AND unite NE 'month' AND unite NE 'year' THEN BEGIN 266 269 dummy = report('time units does not start with seconds/hours/days/months/years') 267 270 err = 1 268 271 ENDIF 269 err = err + 1 - stregex(value, '[^ ]* since ([0-9]){4}-([0-9]){2}-([0-9]){2}.*', /boolean) 272 IF stregex(value, '[^ ]* since ([0-9]){4}-([0-9]){2}-([0-9]){2}.*', /boolean) EQ 0 THEN BEGIN 273 dummy = report('attribut units of time has not the good format: [^ ]* since ([0-9]){4}-([0-9]){2}-([0-9]){2}.*') 274 err = 1 275 ENDIF 270 276 IF err GT 0 THEN BEGIN 271 dummy = report('attribut units of time has not the good format: [^ ]* since ([0-9]){4}-([0-9]){2}-([0-9]){2}.*')272 277 fakecal = 1 273 278 time = date0fk + lindgen(1>jpt) … … 301 306 ; We pass time in IDL julian days 302 307 ; 303 unite = strlowcase(unite)304 IF strpos(unite, 's', strlen(unite)-1) NE -1 THEN unite = strmid(unite, 0, strlen(unite)-1)305 IF strpos(unite, 'julian_') NE -1 THEN unite = strmid(unite, 7)306 308 case unite of 307 309 'second':time = julday(debut[1], debut[2], debut[0])+time/86400.d
Note: See TracChangeset
for help on using the changeset viewer.