Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 20 days 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 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T20:13:21.000Z (about 7 years ago)
- Last Synced: 2024-11-13T21:04:15.857Z (30 days ago)
- Language: JavaScript
- Size: 56.6 KB
- Stars: 211
- Watchers: 10
- 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/