aboutsummaryrefslogtreecommitdiff
path: root/components/updates/DateFormatter.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-07-17 20:42:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-07-17 20:42:50 -0400
commitc4c55a93bc6af8b15f45225169758e08ff1b13cd (patch)
treebf7e7c4070e462e99bcea327588c323025b6a0bb /components/updates/DateFormatter.js
downloadsei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.tar.gz
sei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.tar.bz2
sei-website-c4c55a93bc6af8b15f45225169758e08ff1b13cd.zip
Initial rewrite
Diffstat (limited to 'components/updates/DateFormatter.js')
-rw-r--r--components/updates/DateFormatter.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/components/updates/DateFormatter.js b/components/updates/DateFormatter.js
new file mode 100644
index 0000000..9e236d0
--- /dev/null
+++ b/components/updates/DateFormatter.js
@@ -0,0 +1,9 @@
+
+import { parseISO, format } from 'date-fns'
+
+const DateFormatter = (dateString) => {
+ const date = parseISO(dateString)
+ return <time dateTime={dateString}>{format(date, 'LLLL d, yyyy')}</time>
+}
+
+export default DateFormatter