diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-04 11:44:51 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-04 12:06:34 +1100 |
| commit | ee935784ccdf6e75a853f80b78dac6bf7fb95fbe (patch) | |
| tree | 1da0d852de78ad17a373ca596b3a6c2d5f2d885a /backend | |
| parent | 79a4c7385b0330a6e332726d6ba7bc4ebb27ddf5 (diff) | |
Remove server-side conversion of YearDates >4713 BC to CalDates
The conversion was originally intended to simply the code. But,
as events may span years before and after 4713 BC, the conversion
introduces the possibility of having both YearDates and CalDates
in the same event, which is unhelpful.
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/hist_data/cal.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/backend/hist_data/cal.py b/backend/hist_data/cal.py index 550303e..29959ef 100644 --- a/backend/hist_data/cal.py +++ b/backend/hist_data/cal.py @@ -94,10 +94,7 @@ class HistDate: def dbDateToHistDate(n: int, fmt: int, end=False) -> HistDate: """ Converts a start/start_upper/etc and fmt value in the 'events' db table, into a HistDate """ if fmt == 0: # year - if n >= MIN_CAL_YEAR: - return HistDate(True, n, 1, 1) - else: - return HistDate(None, n) + return HistDate(None, n) elif fmt == 1 or fmt == 3 and end: # jdn for gregorian calendar return HistDate(True, *jdnToGregorian(n)) else: # fmt == 2 or fmt == 3 and not end |
