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






      Convert a given range of dates to Julian Seconds.


Calling Sequence

      date_range_to_js, date1, date2, js1, js2


      date1 = Start date in
        Like 2009 Feb 1.
      date2 = End date in
        Like 2009 Feb 29.
        Full dates should have three items:
          Year, Month, Day in any order.
        Partial dates should have two items, month and day, for
        date1 and date2, in this case all years will be used.
        Instead date2 may be the number of days in range.
        A single item in the date2 string is assumed to be the
        number of days in the range.

Keyword Parameters


        YEARS=yrs Array of years to use with partial dates.
        ERROR=err Error flag: 0=ok.


      js1 = Start date at 00:00:00 in JS. out
      js2 = End date at 00:00:00 in JS. out

Common Blocks


      Notes: If a time interval crosses over the year end, like
      date1 = 'Dec 1' and date2 = 'Feb 28' then adjustments will
      be made to keep all intervals within the specified years.
      For this example a new interval will be added to the first
      year. If the years are 2000,2001,2003 then
      'Jan 1 200' to 'Feb 28 200' will be added, and the interval
      in the last year will end at 'Dec 31 2003' instead of
      'Feb 28 2004'.

Modification History

      R. Sterner, 2012 Oct 10
      R. Sterner, 2012 Oct 11 --- Handled year end crossing.
      R. Sterner, 2012 Nov 29 --- Handled last day of month (Feb mostly).
  Copyright (C) 2012, 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