Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Libraries  >  ASTROLIB  >  MONTH_CNV

MONTH_CNV

MONTH_CNV

Name


      MONTH_CNV

Purpose


      Convert between a month name and the equivalent number
  EXPLANATION: (e.g.,
      For example, converts from 'January' to 1 or vice-versa.

Calling Sequence


      Result = MONTH_CNV( MonthInput, [/UP, /LOW, /SHORT ] )

Inputs


      MonthInput - either a string ('January', 'Jan', 'Decem', etc.) or
              an number from 1 to 12. Scalar or array.

Optional Keywords


      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.
     

Outputs


      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.

Example


      To get a vector of all the month names:
              Names = month_cnv(indgen(12)+1)

Modification History


      Written by: Joel Wm. Parker, SwRI, 1998 Dec 9



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us