time-difference-calculator
Version:
Time difference calculator, This helps in calculating the time difference between two dates and return result like 2 days ago, 45 mins ago and just now.
53 lines (32 loc) ⢠1.32 kB
Markdown
<h1 align="center">Welcome to time-difference-calculator š</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-0.0.1-blue.svg?cacheSeconds=2592000" />
<a href="#" target="_blank">
<img alt="License: ISC" src="https://img.shields.io/badge/License-ISC-yellow.svg" />
</a>
</p>
> Time difference calculator, This helps in calculating the time difference between two dates and return result like 2 days ago, 45 mins ago and just now.
## Install
```sh
npm install time-difference-calculator
```
## Usage
```sh
import {timeDifferenceCalculator} from 'time-difference-calculator';
const date1 = "27/09/2021";
const date2 = "28/09/2021";
console.log('---Time Difference Between Given Date and Current Date---');
console.log(timeDifferenceCalculator(date1));
console.log('---Time Difference Between Two Given Dates---');
console.log(timeDifferenceCalculator(date1, date2));
```
## Author
š¤ **Hari Karthyk**
* Website: https://harikarthyk.xyz/
* Github: [@HariKarthyk](https://github.com/HariKarthyk)
* LinkedIn: [@HariKarthyk](https://linkedin.com/in/HariKarthyk)
## Show your support
Give a āļø if this project helped you!
<a href="https://www.patreon.com/HariKarthyk">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>