1 import { Component } from 'inferno';
2 import * as moment from 'moment';
4 interface MomentTimeProps {
11 export class MomentTime extends Component<MomentTimeProps, any> {
13 constructor(props: any, context: any) {
14 super(props, context);
18 if (this.props.data.updated) {
20 <span title={this.props.data.updated} className="font-italics">modified {moment.utc(this.props.data.updated).fromNow()}</span>
24 <span title={this.props.data.published}>{moment.utc(this.props.data.published).fromNow()}</span>