pro dom,d,m,y,day_of_mission
;+
;  Procedure to calculate number of days into mission YohKoh
;  from numerical day,month,year input
;
;  Use:  supply the day, month and year (numerical) as first 3 parameters.
;    
;  Output:  4th parameter is returned as the Day-Of-Mission
;
;
;  CDP   Oct 91
;
;-

  month = intarr(12)

  month = [0,31,59,90,120,151,181,212,243,273,304,334]

  day_of_year = month(m-1) + d

; check for leap years
; and abbreviated year

  if y lt 100 then y = y + 1900

  if y eq 1992 or y eq 1996 then begin
     leap = 1
  endif else begin
     leap = 0
  endelse

  if leap eq 1 and m gt 2 then day_of_year = day_of_year + 1

  if y eq 1991 then day_of_mission = day_of_year - 241  
  if y eq 1992 then day_of_mission = day_of_year + 124 
  if y eq 1993 then day_of_mission = day_of_year + 490 
  if y eq 1994 then day_of_mission = day_of_year + 855 
  if y eq 1995 then day_of_mission = day_of_year + 1220 
  if y eq 1996 then day_of_mission = day_of_year + 1585 
  if y eq 1997 then day_of_mission = day_of_year + 1951

end
