aboutsummaryrefslogtreecommitdiff
path: root/components/updates/DateFormatter.js
diff options
context:
space:
mode:
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