import toDate from '../toDate/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; name category summary description param { Date | Number } dateLeft param { Date | Number } dateRight returns { Boolean } throws example example export default function isSameMonth ( dirtyDateLeft , dirtyDateRight ) { requiredArgs ( 2 , arguments ) ; const dateLeft = toDate ( dirtyDateLeft ) ; const dateRight = toDate ( dirtyDateRight ) ; return ( dateLeft . getFullYear ( ) === dateRight . getFullYear ( ) && dateLeft . getMonth ( ) === dateRight . getMonth ( ) ) ; }