8 lines
434 B
JavaScript
8 lines
434 B
JavaScript
import requiredArgs from "../requiredArgs/index.js";
|
|
import startOfUTCWeek from "../startOfUTCWeek/index.js";
|
|
export default function isSameUTCWeek(dirtyDateLeft, dirtyDateRight, options) {
|
|
requiredArgs(2, arguments);
|
|
var dateLeftStartOfWeek = startOfUTCWeek(dirtyDateLeft, options);
|
|
var dateRightStartOfWeek = startOfUTCWeek(dirtyDateRight, options);
|
|
return dateLeftStartOfWeek.getTime() === dateRightStartOfWeek.getTime();
|
|
} |