import startOfWeek from '../startOfWeek/index' ; import requiredArgs from '../_lib/requiredArgs/index' ; import type { WeekStartOptions , LocaleOptions } from '../types' ; name category summary description param { Date | Number } dateLeft param { Date | Number } dateRight param options param { Locale } options . locale - the locale object. See [Locale] https param { 0 | 1 | 2 | 3 | 4 | 5 | 6 } options . weekStartsOn returns { Boolean } throws throws example example example export default function isSameWeek ( dirtyDateLeft , dirtyDateRight , dirtyOptions ? ) { requiredArgs ( 2 , arguments ) ; const dateLeftStartOfWeek = startOfWeek ( dirtyDateLeft , dirtyOptions ) ; const dateRightStartOfWeek = startOfWeek ( dirtyDateRight , dirtyOptions ) ; return dateLeftStartOfWeek . getTime ( ) === dateRightStartOfWeek . getTime ( ) ; }