2016-11-16 16:20:52 +00:00
|
|
|
import {
|
|
|
|
FormattedMessage,
|
|
|
|
FormattedDate,
|
|
|
|
FormattedRelative
|
|
|
|
} from 'react-intl';
|
|
|
|
|
2016-11-17 15:34:36 +00:00
|
|
|
const RelativeTimestamp = ({ timestamp }) => {
|
|
|
|
return <FormattedRelative value={new Date(timestamp)} />;
|
2016-11-16 16:20:52 +00:00
|
|
|
};
|
2016-08-24 19:08:00 +00:00
|
|
|
|
2016-11-16 16:20:52 +00:00
|
|
|
RelativeTimestamp.propTypes = {
|
2016-11-17 15:34:36 +00:00
|
|
|
timestamp: React.PropTypes.string.isRequired
|
2016-11-16 16:20:52 +00:00
|
|
|
};
|
2016-08-24 19:08:00 +00:00
|
|
|
|
|
|
|
export default RelativeTimestamp;
|