Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, Germany |
MONTH_CNV
Convert between a month name and the equivalent number EXPLANATION: (e.g., For example, converts from 'January' to 1 or vice-versa.
Result = MONTH_CNV( MonthInput, [/UP, /LOW, /SHORT ] )
MonthInput - either a string ('January', 'Jan', 'Decem', etc.) or an number from 1 to 12. Scalar or array.
UP - if set and if a string is being returned, it will be in all uppercase letters. LOW - if set and if a string is being returned, it will be in all lowercase letters. SHORT - if set and if a string is being returned, only the first three letters are returned.
If the input is a string, the output is the matching month number.If an input string isn't a valid month name, -1 is returned. If the input is a number, the output is the matching month name. The default format is only the first letter is capitalized.
To get a vector of all the month names: Names = month_cnv(indgen(12)+1)
Written by: Joel Wm. Parker, SwRI, 1998 Dec 9
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]