IsSameOrAfter adds the isSameOrAfter
method to EsDay indicating, if a date is the same as or after another date.
IsSameOrAfter has no dependencies on other plugins.
esday().isSameOrAfter(date: DateType, unit?: UnitType): boolean
parameter | description |
---|---|
date | date to compare with |
unit | unit to use for comparison |
import { esday } from 'esday'
import isSameOrAfterPlugin from 'esday/plugins/isSameOrAfter'
esday.extend(isSameOrAfterPlugin)
esday('2010-10-20').isSameOrAfter('2010-10-19', 'day')
// Returns true