0.1.1 ā€¢ Published 2 years ago

next-time-ago v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

next-time-ago

A lightweight tiny time-ago 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-time-ago is available on npm. It can be installed with the following command:

npm install next-time-ago --save

next-time-ago is available on yarn as well. It can be installed with the following command:

yarn add next-time-ago --save

šŸ’” Usage

import { useTimeAgo } from 'next-time-ago';

const Home = () => {
  const { TimeAgo } = useTimeAgo();

  return (
    <>
      <TimeAgo date='September 1, 2022' locale='kh' />

      <TimeAgo date='September 1, 2022' locale='JA' />

      <TimeAgo date='September 1, 2022 9:00 pm' />

      <TimeAgo date='September 1, 2022 20:00' />
    </>
  );
}

export default Home;

Props

List of Locale Codes

šŸ“œ Changelog

Latest version 0.1.1 (2022-10-12):

  • Fix added dependencies

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

ā— Issues

If you think any of the next-time-ago 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-time-ago 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