dhlab-basel / JDNConvertibleCalendar

Different calendars can be freely converted using Julian Day Number
GNU Affero General Public License v3.0
4 stars 3 forks source link

Check rounding of JDN #2

Closed tobiasschweizer closed 6 years ago

tobiasschweizer commented 6 years ago

http://www.fourmilab.ch seems to deal with Julian Day Count which contains the time of the day as a fraction. In Knora, we only support Julian Day Numbers so far which is an integer.

In our code, fractions are ignored. We have to make sure that the rounding is correct, especially when converting a JDN back to a calendar date.

see https://github.com/dhlab-basel/JDNConvertibleCalendar/blob/master/src/JDNCalendarConversion.ts

tobiasschweizer commented 6 years ago

check https://github.com/dhlab-basel/JDNConvertibleCalendar/blob/f91eaf369df22315510800fbd018d3664bc774c3/src/JDNCalendarConversion.ts#L98

tobiasschweizer commented 6 years ago

probably we could also preserve fractions to represent daytime