14
loading...
This website collects cookies to deliver better user experience
this.props.games.map(game => game.date)
2021-06-12T14:00:00.000Z
Enter Moment.js. This is a very simple way to convert your Ruby time to JS time. Here is how to use it in React JS.
First install it to your application.
Then import Moment.
import Moment from 'moment';
Moment(game.date).format('MMMM DD, LT')
June 12, 6:00 AM
Moment.parseZone(game.date).format('MMMM DD, LT')
June 12, 2:00 PM
14