- {!!scene.date && (
-
- )}
+ {!!scene.date && }
)}
-
{scene.date && TextUtils.formatDate(intl, scene.date)}
+
+ {scene.date && TextUtils.formatFuzzyDate(intl, scene.date)}
+
diff --git a/ui/v2.5/src/components/Shared/Date.tsx b/ui/v2.5/src/components/Shared/Date.tsx
new file mode 100644
index 000000000..78dd23afa
--- /dev/null
+++ b/ui/v2.5/src/components/Shared/Date.tsx
@@ -0,0 +1,36 @@
+import React from "react";
+import { FormattedDate as IntlDate } from "react-intl";
+import { PatchComponent } from "src/patch";
+
+// wraps FormattedDate to handle year or year/month dates
+export const FormattedDate: React.FC<{
+ value: string | number | Date | undefined;
+}> = PatchComponent("Date", ({ value }) => {
+ if (typeof value === "string") {
+ // try parsing as year or year/month
+ const yearMatch = value.match(/^(\d{4})$/);
+ if (yearMatch) {
+ const year = parseInt(yearMatch[1], 10);
+ return (
+