@alheimsins/dager-fra-dato

1.0.1 • Public • Published

js-standard-style

dager-fra-dato

Returns days between two dates.

import { daysBetweenDates } from '@alheimsins/uker-fra-dato'
const start = new Date('2021-05-30')
const endOne = new Date('2021-05-31')
const endPast = new Date('2021-05-29')

console.log(daysBetweenDates(start)) //=> 0
console.log(daysBetweenDates(start, endOne)) // => 1
console.log(daysBetweenDates(start, endPast)) // => -1

License

MIT

About

Created with for Alheimsins

Alheimsins logo

Package Sidebar

Install

npm i @alheimsins/dager-fra-dato

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

3.62 kB

Total Files

4

Last publish

Collaborators

  • zrrrzzt
  • maccyber