diff options
author | Vitaly Takmazov | 2018-06-16 23:59:32 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:52 +0300 |
commit | 1b7e41480e213d1f214c368f553d5eb03fb70897 (patch) | |
tree | e1f5642c3d2e7c6d29c39dfc879de583eebcd742 /vnext/src/components | |
parent | ce9d9ed32757e30c32fa9fe29d04491c3d0550d1 (diff) |
moment.js
Diffstat (limited to 'vnext/src/components')
-rw-r--r-- | vnext/src/components/Message.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vnext/src/components/Message.js b/vnext/src/components/Message.js index 9fce97d9..ed0d1857 100644 --- a/vnext/src/components/Message.js +++ b/vnext/src/components/Message.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import ReactMarkdown from 'react-markdown'; +import moment from 'moment'; import Icon from './Icon'; @@ -19,8 +20,8 @@ export default function Message(props) { <div className="msg-ts"> <a href={`/${msg.user.uname}/${msg.mid}`}> <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={msg.timestamp} - title={msg.timestamp}> - {msg.timestamp} + title={moment.utc(msg.timestamp).local().format('lll')}> + {moment.utc(msg.timestamp).fromNow()} </time> </a> </div> |