aboutsummaryrefslogtreecommitdiff
path: root/math/slalib/doc/djcal.hlp
blob: d65c81bd62078d960a88defeffa9da82bb3c3ef4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.help djcal Jun99 "Slalib Package"
.nf

      SUBROUTINE slDJCA (NDP, DJM, IYMDF, J)

     - - - - - -
      D J C A
     - - - - - -

  Modified Julian Date to Gregorian Calendar, expressed
  in a form convenient for formatting messages (namely
  rounded to a specified precision, and with the fields
  stored in a single array)

  Given:
     NDP      i      number of decimal places of days in fraction
     DJM      d      modified Julian Date (JD-2400000.5)

  Returned:
     IYMDF    i(4)   year, month, day, fraction in Gregorian
                     calendar
     J        i      status:  nonzero = out of range

  Any date after 4701BC March 1 is accepted.

  NDP should be 4 or less if internal overflows are to be avoided
  on machines which use 32-bit integers.

  The algorithm is derived from that of Hatcher 1984
  (QJRAS 25, 53-55).

  P.T.Wallace   Starlink   27 April 1998

  Copyright (C) 1998 Rutherford Appleton Laboratory
  Copyright (C) 1995 Association of Universities for Research in Astronomy Inc.

.fi
.endhelp