react-time

by andreypopp

andreypopp / react-time

Component for React to render relative and/or formatted dates into <time> HTML5 element

209 Stars 27 Forks Last release: Not found MIT License 103 Commits 28 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

React Time

Component for React to render relative and/or formatted dates by using

HTML5 element and preserving machine readable format in
datetime
attribute.

Installation

% npm install react-time

Usage

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

) } }

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.