React timeago component for your next React apps.
next-timeago is available on npm. It can be installed with the following command:
npm install next-timeago --save
next-timeago is available on yarn as well. It can be installed with the following command:
yarn add next-timeago --save
import { useTimeAgo } from 'next-timeago';
const Home = () => {
const { TimeAgo } = useTimeAgo();
return (
<>
<TimeAgo date='July 1, 2023' locale='kh' />
<TimeAgo date='July 1, 2023' locale='JA' />
<TimeAgo date='July 1, 2023 9:00 pm' />
<TimeAgo date='July 1, 2023 20:00' />
</>
);
}
export default Home;
Latest version 0.2.0 (2023-08-23):
Details changes for each release are documented in the CHANGELOG.md.
If you think any of the next-timeago
can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
We'd love to have your helping hand on contributions to next-timeago
by forking and sending a pull request!
Your contributions are heartily welcome, recognized and appreciated. ()
How to contribute:
The MIT License