JDSTR
Name
jdstr
Purpose (one Line)
Convert Julian date into an ASCII string.
Description
Category
Utility
Calling Sequence
jdstr, jd, places, str
Inputs
jd - Julian Date to be converted to a string. May be a vector, in
which case the output is a vector.
places - Integer scalar. Format and resolution of output string. The
units, tens, and hundreds positions of this parameter control
the output format. If this parameter is negative, the sign
is applied only to the units place. Thus the following
possibilities:
units = -8 decimal hours. HH.hhhhh
= -7 nearest hour. HH
= -6 nearest 30 minutes. HH:(00,30)
= -5 nearest 15 minutes. HH:(00,15,30,45)
= -4 nearest 10 minutes. HH:M0
= -3 nearest 5 minutes. HH:M(0,5)
= -2 nearest minute. HH:MM
= -1 nearest ten seconds. HH:MM:S0
= 0 nearest second. HH:MM:SS
= 1 nearest tenth of a second. HH:MM:SS.s
= 2 nearest hundredth of a second. HH:MM:SS.ss
= 3 nearest thousandth of a second. HH:MM:SS.sss
tens = 0 month is numeric (ex 1993/08/06)
= 1 month is three-character abbreviated name (ex 1993 Aug 06)
= 2 month is full name (ex 1993 August 06)
hundreds = 0 append time using the units position code.
= 1 time is not appended.
= 2 time is appended as decimal days, in this case
the units digit specifies how many decimal places to
show on the day.
= 3 all separators are omitted (ex 19930806121243)
Optional Input Parameters
Keyword Parameters
TIMESEP - When the default format puts '/' between time fields, this
keyword, if provided, will override the '/'
Outputs
str - Output string for the converted date.
Common Blocks
Side Effects
Restrictions
Procedure
Convert a time as a Julian date into a string. The time is first
rounded to the requested digit. Then the date (after
rounding) is converted to a string. Thus, a time of 23:59:59.9
rounded to the nearest second would actually cause the day to be
incremented by one and generate a time of 00:00:00. PLACES indicates
the reported precision of the string, see INPUTS for posibilities.
Calls external routines: caldatm, jdcnv, and rastr.
Modification History
Copyright (C) 1991, by Marc W. Buie. Version dated 91/9/9
Ported by Doug Loucks, Lowell Observatory, August, 1993, from the
C-Language version written by Marc Buie.
99/1/13, MWB, added decimal day output option.
2003/05/02, MWB, added hundreds=3 option
2005/06/27, MWB, fixed bug for hundreds=2 case
2009/06/23, MWB, fixed problem with places=202 and vector input
2013/09/19, MWB, add trimrank call at the end so one element vectors are
suppressed.