aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-10-14 15:56:40 +1100
committerTerry Truong <terry06890@gmail.com>2022-10-14 15:58:18 +1100
commit28e40c322562e55eb556f2a6864e5e054ec02df4 (patch)
treec82b702be048b9b64564ea0261519df9f2f6d1f6 /src/lib.ts
parent642abe0d7b1fda221f3a9f8c5b30d85b4f6d0dc3 (diff)
Avoid displaying pre-JDN dates with sub-year scale
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.ts b/src/lib.ts
index ddaf479..1348498 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -131,7 +131,7 @@ export class HistDate {
const currentDate = new Date();
export const MIN_DATE = new HistDate(-13.8e9);
export const MAX_DATE = new HistDate(currentDate.getFullYear(), currentDate.getMonth() + 1, currentDate.getDate());
-export const JDN_EPOCH = -4713; // The year where julian day numbers start (and where we can represent months+days)
+export const MIN_CAL_DATE = new HistDate(-4700, 1, 1); // Date after which months/day scales are usable
export const MONTH_SCALE = -1;
export const DAY_SCALE = -2;
export const SCALES = [1e9, 1e8, 1e7, 1e6, 1e5, 1e4, 1e3, 100, 10, 1, MONTH_SCALE, DAY_SCALE];