;+ ; NAME: ; DATE2JDAY ; ; PURPOSE: ; This function returns julian day converted from the specified date. ; ; CALLING SEQUENCE: ; RESULT = DATE2JDAY(YR, MO, DY) ; ; INPUTS: ; YR (Integer) Last two digits of year [80, 99]. ; MO (Integer) 2 digits abbreviation of month, [1, 12]. ; DY (Integer) Day of month, [1, 31]. ; ; OUTPUTS: ; RESULT: (Integer) Julian day. ; ; KEYWORD PARAMETERS: ; ; RESTRICTIONS: ;- ;============================================================================= FUNCTION date2jday, yr, mo, dy leapyr = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335] nleapyr = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] IF (yr MOD 4) EQ 0 THEN BEGIN mon = leapyr ENDIF ELSE BEGIN mon = nleapyr ENDELSE RETURN, mon(mo-1) + dy END