https://github.com/andreypopp/react-time
Component for React to render relative and/or formatted dates into <time> HTML5 element
https://github.com/andreypopp/react-time
Last synced: 8 months ago
JSON representation
Component for React to render relative and/or formatted dates into <time> HTML5 element
- Host: GitHub
- URL: https://github.com/andreypopp/react-time
- Owner: andreypopp
- License: mit
- Created: 2013-07-07T20:23:34.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T20:13:21.000Z (about 8 years ago)
- Last Synced: 2025-03-29T16:07:58.004Z (8 months ago)
- Language: JavaScript
- Size: 56.6 KB
- Stars: 211
- Watchers: 9
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-components-all - react-time - Component for React to render relative and/or formatted dates into <time> HTML5 element. (Uncategorized / Uncategorized)
- awesome-list - react-time - Component for React to render relative and/or formatted dates into <time> HTML5 element. (Demos / Time / Date / Age)
README
React Time
==========
Component for [React][] to render relative and/or formatted dates by using
`
Installation
------------
% npm install react-time
Usage
-----
```jsx
import React from 'react'
import Time from 'react-time'
class MyComponent extends React.Component {
render() {
let now = new Date()
let wasDate = new Date("Thu Jul 18 2013 15:48:59 GMT+0400")
return (
Today is
This was
)
}
}
```
[React]: https://facebook.github.io/react/