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

37 lines
922 B
Plaintext

"use strict";
exports.isYesterday = isYesterday;
var _index = require("./constructFrom.cjs");
var _index2 = require("./constructNow.cjs");
var _index3 = require("./isSameDay.cjs");
var _index4 = require("./subDays.cjs");
/**
* The {@link isYesterday} function options.
*/
/**
* @name isYesterday
* @category Day Helpers
* @summary Is the given date yesterday?
* @pure false
*
* @description
* Is the given date yesterday?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is yesterday
*
* @example
* // If today is 6 October 2014, is 5 October 14:00:00 yesterday?
* const result = isYesterday(new Date(2014, 9, 5, 14, 0))
* //=> true
*/
function isYesterday(date, options) {
return (0, _index3.isSameDay)(
(0, _index.constructFrom)(options?.in || date, date),
(0, _index4.subDays)((0, _index2.constructNow)(options?.in || date), 1),
);
}