0.2.0 ā€¢ Published 9 months ago

next-timeago v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

next-timeago

React timeago component for your next React apps.

NPM JavaScript Style Guide

šŸŽ Features

  • No dependencies
  • Compatible with both JavaScript and TypeScript
  • Support for various languages

šŸ”§ Install

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

šŸ’” Usage

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;

Props

List of Locale Codes

šŸ“œ Changelog

Latest version 0.2.0 (2023-08-23):

  • Upgrade dependencies

Details changes for each release are documented in the CHANGELOG.md.

ā— Issues

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.

šŸ’Ŗ Contribution

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:

  • Open pull request with improvements
  • Discuss ideas in issues
  • Spread the word
  • Reach out with any feedback

šŸ† Contributors

āš–ļø License

The MIT License License: MIT