%N julday %F $MIR/src/subs/julday.for
%D Format a Julian day into a conventional calendar day.
%P jm
%: julian-day, date, utilities
%B
      subroutine julday(julian, form, calday)

      implicit none
      double precision julian
      character form*(*), calday*(*)

  Convert from Julian date to calendar date.  This is not to high
  accuracy, but it achieves the accuracy required.  See "Astronomical
  Formulae for Calculators", Jean Meeus (Wiillmann-Bell Inc).
  The day is assumed to begin at 0 hours UT.

  Input:
    julian      Julian date.
    form        Output selection flag.  It must be one of
                'D', 'F', 'H', 'T', or 'V' (case independent).

  Output:
    calday      (Gregorian) Calendar day (UT time).
                The output if form = 'D' is like:
                       'yymmmdd.dd'
                The output if form = 'F' is like:
                       'dd/mm/yy' (loss of fractional days)
                The output if form = 'H' is like:
                       'yymmmdd:hh:mm:ss.s'
                The output if form = 'T' is like:
                       'ccyy-mm-ddThh:mm:ss.s' (the T is literal)
                The output if form = 'V' is like:
                       'dd-mmm-ccyy' (loss of fractional days)

                Note that cc is used to denote the century; yy the
                year (mod 100); mm the decimal month number (1-12);
                mmm a string describing the month; dd the day number;
                dd.dd the fractional day number; and hh:mm:ss.s the
                hours, minutes, and seconds of the day.
