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






      Set up a time and date string from reference JD and offset.


Calling Sequence

      s = dt_tm_mak(jd0, [sec])


      jd0 = Julian Date of a reference date (0:00 hr). in
      sec = Seconds since JD0 at 0:00. in

Keyword Parameters


        NUMBERS=st Structure with numeric values, useful at times.
        FORMAT = format string. Allows output date to be customized.
        The default format string is 'Y$ n$ d$ h$:m$:s$ w$'
            The following substitutions take place in the format string:
        Y$ = 4 digit year.
        y$ = 2 digit year.
        N$ = full month name.
        n$ = 3 letter month name.
        0n$= month as a 2 digit number: Jan=1, Feb=2, Dec=12.
        d$ = day of month number.
        0d$= 2 digit day of month number.
        doy$= 3 digit day of year (see DDECIMAL below).
        W$ = full weekday name.
        w$ = 3 letter week day name.
        0w$ = week day number: Sun=1, Mon=2, ... Sat=7.
        h$ = hour.
        m$ = minute.
        s$ = second.
        f$ = fraction of second (see DECIMAL, DENOMINATOR below).
        I$ = time interval in days to 2 decimal places.
        i$ = time interval in days as an integer.
          I$ and i$ apply to sec in dt_tm_mak only.
        H$ = time interval in integer hours.
        sam$ = Time in seconds after midnight (DECIMAL works here).
        @ = Carriage Return.
        ! = Line feed.
        DECIMAL=dp Number of decimal places to use for fraction of
          second (def=3) for f$ in format. f$ will include dec pt.
          Also applies to fraction shown in sam$.
        DENOMINATOR=den If given then fraction is listed as nnn/ddd
          ddd is given by den. Over-rides DECIMAL keyword. Ex:
          DENOM=1000 might give 087/1000 for f$ in format.
        DDECIMAL=ddp Num of dec places in Day of Year (def=none).


      s = resulting string. out

Common Blocks


      Notes: Some examples: 'h$:m$:s$' -> 09:12:04,
        'd$ n$ Y$' -> 12 Jan 1991, 'd$D h$h' -> 3D 2h, ...

Modification History

      R. Sterner. 17 Nov, 1988.
      Johns Hopkins University Applied Physics Laboratory.
      RES 20 Apr, 1989 --- 2 digit year.
      R. Sterner, 26 Feb, 1991 --- Renamed from time_date_str.pro
      R. Sterner, 27 Feb, 1991 --- Renamed from tm_dt_str.pro
      R. Sterner, 28 Feb, 1991 --- changed format.
      R. Sterner, 17 Jun, 1992 --- fixed a bug for large sec.
      R. Sterner, 27 Sep, 1993 --- Modified to handle arrays.
      R. Sterner, 2 Dec, 1993 --- Slightly modified def format.
      R. Sterner, 1994 Jun 15 --- Added fraction of second.
      R. Sterner, 1995 Mar 8 --- Added i$ format.
      R. Sterner, 1995 Jul 6 --- Added 0d$ format.
      R. Sterner, 1997 Feb 3 --- Added new keywords 0n$ and doy$ to
      give month as 2 digit number and day of year.
      Matthew Savoie, Systems Technology Associates --- 1997 Feb 5
      fixed a bug by adding floor to: days = long(floor(idays)).
      R. Sterner, 1997 Dec 18 --- Added DDECIMAL=ddec for number of
      decimal places in Day of Year.
      R. Sterner, 1998 Apr 14 --- added sam$ format.
      R. Sterner, 1998 Apr 15 --- Added returned numeric structure.
      R. Sterner, 1998 May 21 --- Fixed a bug found by Dave Watts and
      Damian Murphy that caused a lost second sometimes.
      R. Sterner, 1998 Jul 15 --- A bug was fixed by Tami Kovalick,
      Raytheon STX, 2 digit years failed beyond 1999.
      R. Sterner, 1998 Aug 10 --- Fixed a bug in the way structures are
      indexed for single values.
      R. Sterner, 2000 Jan 03 --- Fixed a problem that came up when year
      ended in 0. Might even be a touch faster.
      R. Sterner, 2007 Jan 04 --- Made for loop indices long. Reported
      by David Sahnow <sahnow@jhu.edu> 29 Dec 2006.
      R. Sterner, 2008 May 27 --- Now using eps for sechms to avoid errors
      in text reports fractions of seconds.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1988, 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