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






      Convert seconds after midnight to a time string.


Calling Sequence

      tstr = strsec(sec, [d])


      sec = seconds after midnight. in
        Scalar or array.
      d = optional denominator for a fraction. in

Keyword Parameters


          /HOURS forces largest time unit to be hours instead of days.


      tstr = resulting text string. out

Common Blocks


      Notes: Output is of the form: [DDD/]hh:mm:ss[:nnn/ddd]
        where DDD=days, hh=hours, mm=minutes, ss=seconds,
        nnn/ddd=fraction of a sec given denominator ddd in call.
        If sec is double precision then 1/10 second can be
        resolved in more than 10,000 days. Use double precision when
        possible. Time is truncated, so to round to nearest second,
        when not using fractions, add .5 to sec.

Modification History

      Written by R. Sterner, 8 Jan, 1985.
      Johns Hopkins University Applied Physics Laboratory.
      RES --- Added day: 21 Feb, 1985.
      RES 19 Sep, 1989 --- converted to SUN
      RES 18 Mar, 1990 --- allowed arrays.
      R. Sterner, 27 Jan, 1993 --- dropped reference to array.
      R. Sterner, 12 Feb, 1993 --- returned 1 element array as a scalar.
      also cleaned up.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
  Copyright (C) 1985, 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