From 7d29340d5e209b1b4ea1bc3167bc7f1274088fc8 Mon Sep 17 00:00:00 2001 From: glacials Date: Mon, 17 Jun 2024 09:11:54 -0700 Subject: [PATCH] Replace "QX 20XX" with "early/late 20XX" in UI --- web/src/types/BiDate.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/types/BiDate.js b/web/src/types/BiDate.js index bd7a780e..4e73c654 100644 --- a/web/src/types/BiDate.js +++ b/web/src/types/BiDate.js @@ -62,6 +62,12 @@ export class BiDate { }); } + if (this.rough.match(/Q[12] \d{4}/)) { + return this.rough.replace(/Q\d/, "early"); + } else if (this.rough.match(/Q[34] \d{4}/)) { + return this.rough.replace(/Q\d/, "late"); + } + return this.rough; }