1.0.5 • Published 1 year ago

react-datetime-ago v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React DateTime Ago

React DateTime Ago npm package is used to show date and time in formatted way. e.g 1 min ago , 20 days ago, 1 month ago, 2 years ago.

Authors

Installation

To install react datetime ago npm package

  npm i react-datetime-ago

Usage/Examples

import React from 'react'
import {TimeAgo} from 'react-datetime-ago'

const App = () => {
  return (
        <TimeAgo 
          date="Wed, 31 Jan 2024 08:18:48 +0000" // TimeStamp is not supported
        />
  )
}

export default App
  

Result

Result after execution of above code

  20 hours ago

API Reference

TimeAgo Api Reference

PropsTypeDefaultDescription
datedatetimenonepass the date

Contributing

Contributions are always welcome!

Please adhere to this project's code of conduct.

1.0.5

1 year ago

1.0.4

1 year ago