Skip to content
T

timeago-react

Format date with time ago statement. eg: '3 hours ago'

by hustccFree

#233in UI Libraries
0In stores

Description

timeago-react is a small React component that shows a date as relative time, such as '3 hours ago'. It is built on the timeago.js module and…

Highlights

  • Shows dates as relative time such as '3 hours ago'
  • Updates live and cleans up its timer
  • Accepts strings, Date objects or timestamps
  • Supports multiple locales
  • About 2 KB, MIT licensed

Ratings & Reviews

No ratings yet

Be the first to rate timeago-react.

People also visit

R

react-timeago

A simple time-ago component for ReactJs

UI Libraries
Launch
R

react-relative-time

React Component for rendering relative dates as <time> HTML5 elements

UI Libraries
Launch
R

react-moment

React component for the moment date library

UI Libraries
Launch
L

@leenguyen/react-flip-clock-countdown

A 3D animated countdown component for React

UI Libraries
Launch
D

date-range-picker

Flexible React date range picker calendar with no dependencies

UI Libraries
Launch
R

react-datetime

A lightweight but complete datetime picker React.js component

UI Libraries
Launch

timeago-react FAQ

What is timeago-react?

A React component that displays a date as a relative time statement, such as '3 hours ago'.

How do I install it?

Run npm install timeago-react, then render the component with a datetime prop.

What date formats does it accept?

The datetime prop accepts a datetime string, a Date instance or a timestamp.

Does the text update over time?

Yes. By default the component is live, and the text refreshes as time passes.

Can I change the language?

Yes. Set the locale prop, and import any locale other than the default English and Simplified Chinese before using it.

Is it free to use?

The project is released under the MIT license.

What are the best timeago-react alternatives?

Popular alternatives to timeago-react include react-timeago, react-relative-time and react-moment. See all timeago-react alternatives

Developer Stuff

Badges