Open reza-ghazi opened 1 year ago
The Skyfield documentation explains that here:
https://rhodesmill.org/skyfield/time.html#uniform-time-scales-tai-tt-and-tdb
Since it's hard to discover that bit of explanation, I'll plan to turn it into its own little section, and maybe move it up next to the "Ancient and modern dates" section nearer to the top so it's easier to find.
So, you mean that intentionally you kept utc_jpl
to handle calendrical logic and utc
to take as the arithmetical year counter.
In other words:
Year 0 (UTC) == Year 1 BC (UTC_JPL)
I would put it this way — and will try putting language like this into the documentation:
Python integers are positive or negative, not AD
or BC
; there is no way to return a Python integer and have it know its value is 4 BC
. Instead, -3
must be returned, because Python integers don't have a BC
flag.
If the incorrect value -4
was returned when what's really meant is 4 BC
, then math would break: the user would ask the question ‘how many years passed between 4 BC and AD 4?’ and instead of getting the correct response 7
, they would subtract 4 - -4
and get the value 8
.
It is not Skyfield's decision to represent years this way, but it's the astronomy community's decision about how to represent years when using the integer number line:
https://en.wikipedia.org/wiki/Astronomical_year_numbering
Let's leave this issue open until I've updated all documentation that returns integer years, so that it's mentioned that negative years don't mean BC!
Result:
Why do
utc_jpl()
andutc
show different years for negative years? It seemsutc_jpl
handles the year right before year1
as year-1
, bututc
takes it as year0
.Isn't it better to make both the same so that they handle the year before year
1
as year-1
and not0
?