1
0
mirror of synced 2024-12-14 23:32:53 +01:00
bemaniutils/bemani/frontend/static/components/timestamp.react.js
2019-12-08 21:43:49 +00:00

16 lines
399 B
JavaScript

/** @jsx React.DOM */
var Timestamp = React.createClass({
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>
);
},
});