;+ ; Contains the valid_month function ; ; :Author: ; Gaƫlle Boisnard ; ; :History: ; 2004/03/29: Created ; ; 2004/03/29: Last Edit ;- ; ;+ ; Transforms the string month in a long integer, if possible ; ; :Returns: ; ; ; :Params: ; month: in, required, type=string ; a string ;- FUNCTION valid_month, month tab01_12=['1', '2', '3', '4', '5', '6', '7', '8', '9', '01', '02', '03', '04', '05', '06', '07', $ '08', '09', '10', '11', '12'] month=strtrim(month, 2) length=strlen(month) ind=where(month eq tab01_12, count) if (count eq 0) then begin return, 0 endif return, long(month) end