Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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/