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






      Find day of year number from date.


Calling Sequence

      dn = date2dn(date)


      date = date string (like 6 Jul, 1995). in
        Default date is current date and time.

Keyword Parameters


      dn = day number in year (like 187). out

Common Blocks


      Notes: The format of the date is flexible except that the
        month must be month name.
        Dashes, commas, periods, or slashes are allowed.
        Some examples: 23 sep, 1985 sep 23 1985 1985 Sep 23
        23/SEP/85 23-SEP-1985 85-SEP-23 23 September, 1985.
        Doesn't check if month day is valid. Doesn't
        change year number (like 86 does not change to 1986).
        Dates may have only 2 numeric values, year and day. If
        both year & day values are < 31 then day is assumed first.
        systime() can be handled: dn=date2dn(systime()).
        Day number is returned as a string.
        For invalid dates dn is set to a null string.
        Times are allowed.

Modification History

      R. Sterner, 1995 Jul 6
      R. Sterner, 2004 Sep 16 --- Made default be current date/time.
  Copyright (C) 1995, 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