1.0.0 • Published 8 years ago

@f/is-same-day v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

is-same-day

Build status Git tag NPM version Code style

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