azat-co / react-quickly

Source code for React Quickly [Manning, 2017]: Painless Web Apps with React, JSX, Redux, and GraphQL đź“•
http://reactquickly.co
MIT License
544 stars 422 forks source link

Method 'toLocaleString()' moved from state to child element (DigitalD… #38

Open tampambro opened 4 years ago

tampambro commented 4 years ago

As i understand, if format of date differs from USA standards, in AnalogDisplay's component 'new Date(props.time)' will be output 'Invalid Date'. That's why animations of arrows will not working. CSS property 'transform' will get NaN.

(At least with the Russian date format, such a problem exists.)

Local time formatting only in 'DigitalDisplay' - it's my solvetion of this problem.