UNPKG

our-dates

Version:

A simple date utility library for Javascript

42 lines (32 loc) 1.78 kB
# Our Dates A date utility library for simple use cases, zero dependency and lightweight. [![License: MIT](https://img.shields.io/npm/l/our-dates?color=blueviolet)](LICENSE.md) [![Current version](https://img.shields.io/npm/v/our-dates?color=blueviolet)](https://www.npmjs.com/package/our-dates) [![Weekly downloads](https://img.shields.io/npm/dw/our-dates?color=blueviolet)](https://www.npmjs.com/package/our-dates) [![install size](https://packagephobia.com/badge?p=our-dates)](https://packagephobia.com/result?p=our-dates) [![sponsor this project](https://img.shields.io/badge/-%F0%9F%93%9A%20buy%20me%20a%20book-blueviolet)](https://www.buymeacoffee.com/alvaro1dias) `our-dates` was created for some use cases and solve problems with fast and easy. Working with dates in programming and in severals situations are boring and confusing. With this library this task is more easy. You can handle dates, calculate differences between dates, convert dates, and more. In addition to being able to use some utility methods. Read the documentation: [Documentation](https://ourdates.alvaroemanuel.tech/) ## Installation `our-dates` can be installed with `yarn` or `npm` ```shell # with yarn yarn add our-dates ``` ```shell # with npm npm install our-dates ``` ## Usage ```javascript import { differenceInHours } from 'our-dates'; const laterDate = new Date(2023, 4, 2, 15, 40); const earlierDate = new Date(2023, 4, 2, 12, 40); differenceInHours(laterDate, earlierDate) //3 hours ``` ## Documentation Read the documentation: [Documentation](https://ourdates.alvaroemanuel.tech/) ## Contact - Github: [My Github](https://github.com/alvaroemanuel20) - Linkedin: [My Linkedin](https://linkedin/in/alvaroemanuel20) - Instagram: [@alvaro1dias](https://instagram.com/alvaro1dias)