1.0.1 • Published 2 years ago

@goodies/is-same-day v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

is-same-day

System Requirements

Installation

npm i @goodies/is-same-day
yarn add @goodies/is-same-day

Usage

import isSameDay from '@goodies/is-same-day'

const today = new Date()
const yesterday = new Date()

yesterday.setDate(today.getDate() - 1)

console.log(await isSameDay(today, today)) // true
console.log(await isSameDay(today, yesterday)) // false