Files
klz-cables.com/.pnpm-store/v10/files/50/e8f43006104f2f033883b5401516057ab4c4a0d9f4d5872aa22080761a698a0bdec3302ecba18d055681b1c8fcbb0453b913ab9c9a7bf780f229a09caf08c1
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

30 lines
906 B
Plaintext

import { constructNow } from "./constructNow.mjs";
import { isSameQuarter } from "./isSameQuarter.mjs";
/**
* @name isThisQuarter
* @category Quarter Helpers
* @summary Is the given date in the same quarter as the current date?
* @pure false
*
* @description
* Is the given date in the same quarter as the current 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 date - The date to check
*
* @returns The date is in this quarter
*
* @example
* // If today is 25 September 2014, is 2 July 2014 in this quarter?
* const result = isThisQuarter(new Date(2014, 6, 2))
* //=> true
*/
export function isThisQuarter(date) {
return isSameQuarter(date, constructNow(date));
}
// Fallback for modularized imports:
export default isThisQuarter;