>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  YY2YYYY






      Convert a 2 digit year to a 4 digit year.


Calling Sequence

      yyyy = yy2yyyy( yy)


      yy = 2 digit year. in

Keyword Parameters


        /PAST means 4 digit year is current or past.
          Use this for birthdates or any dates known to be past.
          By default closest 4 digit year is returned.
        BASE=base Use the year given in base instead of the
          current year to figure out the 4 digit years.
        ERROR=err Error flag: 1=ok.
        /QUIET do not show error messages.


      yyyy = 4 digit year. out
        On error returns -1.

Common Blocks


      Notes: 2 digit years will always be useful, so a
        good way to convert them to 4 digit years is also
        useful. This routine should not break in the future.
        If incoming value is a string, returned value will be
        a string with no spaces on ends.

Modification History

      R. Sterner, 1999 Aug 2
      R. Sterner, 2001 Jan 05 --- Added special check for string values.
      R. Sterner, 2003 Aug 27 --- Better error checking.
      R. Sterner, 2007 Jan 04 --- Made for loop index long.
      R. Sterner, 2008 Aug 06 --- Added ERROR=err and /QUIET.
      R. Sterner, 2010 Apr 29 --- Converted arrays from () to [].
  Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.

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