@f/is-same-day
v1.0.0
Published
Check if two dates are on the same day
Downloads
9
Readme
is-same-day
Check if two dates are on the same day
Installation
$ npm install @f/is-same-day
Usage
var isSameDay = require('@f/is-same-day')
if (isSameDay(post1.createdAt, post2.createdAt)) {
alert('post1 and post2 were created on the same day')
}
API
isSameDay(date1, date2)
date1
- Date object.- `date2 - Date object.
Returns: Boolean indicating whether or not date1
and date2
are on the same calendar day.
License
MIT