function get_dpm,month,year,days=days ; ; *** Function that returns the number of days in a given ; *** month. Accounts for leap year. ; dpm = intarr(2,12) dpm(0,*) = [31,28,31,30,31,30,31,31,30,31,30,31] dpm(1,*) = [31,29,31,30,31,30,31,31,30,31,30,31] leap = 0 if(((year mod 4) eq 0) and ((year mod 100) ne 0) $ or ((year mod 400) eq 0) ) then leap=1 dpm = dpm(leap,month-1) days = string(indgen(dpm)+1,format='(I2.2)') return,dpm end