1
0
mirror of synced 2024-12-24 03:34:50 +01:00
bemaniutils/bemani/frontend/static/components/timestamp.react.js

16 lines
398 B
JavaScript
Raw Normal View History

/** @jsx React.DOM */
var Timestamp = createReactClass({
render: function() {
if (this.props.timestamp <= 0) {
return <div className="timestamp">N/A</div>;
}
var t = new Date(this.props.timestamp * 1000);
var formatted = t.format('Y/m/d @ g:i:s a');
return (
<div className="timestamp">{ formatted }</div>
);
},
});