aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/Date.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/Date.js')
-rw-r--r--webui/src/Date.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/webui/src/Date.js b/webui/src/Date.js
new file mode 100644
index 00000000..b20fd274
--- /dev/null
+++ b/webui/src/Date.js
@@ -0,0 +1,11 @@
+import Tooltip from '@material-ui/core/Tooltip/Tooltip'
+import * as moment from 'moment'
+import React from 'react'
+
+const Date = ({date}) => (
+ <Tooltip title={moment(date).format('MMMM D, YYYY, h:mm a')}>
+ <span> {moment(date).fromNow()} </span>
+ </Tooltip>
+)
+
+export default Date