aboutsummaryrefslogtreecommitdiff
path: root/app/updates/DateFormatter.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2023-07-19 00:48:11 -0400
committerAndrew Lee <alee14498@protonmail.com>2023-07-19 00:48:11 -0400
commitd57226e5a802ecd6607faf67f32621e2da725a35 (patch)
treed2073bbc14409095c61255ea83b2ca3815df309d /app/updates/DateFormatter.js
parent3c80755e70aa85daa59edc5dbe200400894254c7 (diff)
downloadalure-website-d57226e5a802ecd6607faf67f32621e2da725a35.tar.gz
alure-website-d57226e5a802ecd6607faf67f32621e2da725a35.tar.bz2
alure-website-d57226e5a802ecd6607faf67f32621e2da725a35.zip
Moved all components to app folder
Diffstat (limited to 'app/updates/DateFormatter.js')
-rw-r--r--app/updates/DateFormatter.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/updates/DateFormatter.js b/app/updates/DateFormatter.js
new file mode 100644
index 0000000..9e236d0
--- /dev/null
+++ b/app/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