For a discussion of the Julian date system, see the specification.
# - - - - - c l a s s J u l i a n D a t e
class JulianDate:
"""Class to represent Julian-date timestamps.
State/Invariants:
.f: [ (Julian date as a float) - JULIAN_BIAS ]
"""
The value represented is the some of the two arguments
(the second of which default to zero), but JULIAN_BIAS is subtracted before the two
argument values are added, to avoid loss of significance.
# - - - J u l i a n D a t e . _ _ i n i t _ _
def __init__ ( self, j, f=0.0 ):
"""Constructor for JulianDate.
"""
self.j = j - JULIAN_BIAS + f