>  Docs Center  >  Libraries  >  Buie  >  MON2NUM
Libraries

MON2NUM

MON2NUM

Name


  mon2num

Purpose (one Line Only)


  Convert the name of a month to its integer equivalent.

Description


Category


  Utility

Calling Sequence


  mon2num, name, result

Inputs


  name - String or string array with the name of a month, the case does
            not matter and the string need only be long enough to be unique.

Optional Input Parameters


Keyword Input Parameters


  FULLDATE - This keyword controls what is done with the input string. If
                not supplied, or, set to zero, the input is expected to be
                just the name of the month. This is the default behavior.
                The result will be an integer for the number of the month.
            If a non-zero value is supplied, the number indicates the
                maximum number of characters from the name of the month to
                search to find a match. The smallest useful value is 3
                but if you provide a smaller number you may not get a correct
                answer. The largest useful value is 9 but if you provide
                a larger number it will still work. In this case, the result
                and an edited version of the input string where the name of
                the month is replaced with a two digit zero-padded number.

Outputs


  result - Number of the month (1=Jan, 2=Feb, etc.), or, if FULLDATE is set
              the result is an edited version of the input string.

Keyword Output Parameters


Common Blocks


Side Effects


Restrictions


  If the name you give is not unique, the first match is returned.
  If the name you give is not correct, you get a 0 back for that entry.

Procedure


Modification History


  Written by Marc W. Buie, Lowell Observatory, 2008/02/03
  2013/02/20, MWB, add trimrank call at the end, one element vector will
                  now be returned as a scalar
  2014/04/13, MWB, add FULLDATE keyword



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us