Files
klz-cables.com/.pnpm-store/v10/files/23/e9c75764eecf1bae60dda1cdc252989865e085f08449b76643b7691293c35b58765574154e01dd20d273e39d739485e3242d426d5ff0dc5f3bb02460882b70
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

33 lines
1.2 KiB
Plaintext

"use strict";
exports.isSameISOWeekYear = isSameISOWeekYear;
var _index = require("./startOfISOWeekYear.js");
/**
* @name isSameISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Are the given dates in the same ISO week-numbering year?
*
* @description
* Are the given dates in the same ISO week-numbering year?
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same ISO week-numbering year
*
* @example
* // Are 29 December 2003 and 2 January 2005 in the same ISO week-numbering year?
* const result = isSameISOWeekYear(new Date(2003, 11, 29), new Date(2005, 0, 2))
* //=> true
*/
function isSameISOWeekYear(dateLeft, dateRight) {
const dateLeftStartOfYear = (0, _index.startOfISOWeekYear)(dateLeft);
const dateRightStartOfYear = (0, _index.startOfISOWeekYear)(dateRight);
return +dateLeftStartOfYear === +dateRightStartOfYear;
}