React Time
Component for React to render relative and/or formatted dates by using
<time>
HTML5 element and preserving machine readable format in datetime
attribute.
Installation
% npm install react-time
Changes in tt-react-time fork
- Support React 16
- Update prop-types dependencies
Original project: https://github.com/andreypopp/react-time
Some changes applied from https://github.com/ianatha/react-time
Usage
import React from 'react'import Time from 'react-time' Component { let now = let wasDate = "Thu Jul 18 2013 15:48:59 GMT+0400" return <div> <p>Today is <Time = ="YYYY/MM/DD" /></p> <p>This was <Time = ="YYYY/MM/DD HH:mm" /></p> </div> }