Sha256: c73318aeb0cbaa7c41280fdb4e528f8b03e7fb7ebf5445717d1a122a8e1e6c32

Contents?: true

Size: 444 Bytes

Versions: 3

Compression:

Stored size: 444 Bytes

Contents

/** @jsx React.DOM */
  
// render a <time> tag. props.timestamp should be a timestamp
// that moment can parse, props.format should be one of the
// format strings accepted by moment (optional).
var Time = React.createClass({
  render: function(){
    var timestamp = this.props.timestamp;
    var format = this.props.format || 'lll';
    var m = moment(timestamp);
    
    return <time datetime={m.format()}>{m.format(format)}</time>;
  }
})

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
conjur-asset-ui-api-1.2.0 public/js/views/time.js
conjur-asset-ui-api-1.1.1 public/js/views/time.js
conjur-asset-ui-api-1.1.0 public/js/views/time.js