Rocky_Mountain_Vending/.pnpm-store/v10/files/3f/3095112e21587ffed1ee277806f51c486d234e91b68e54a86e08c91116d35fb50b0c72c8f13e938018ce555866aa24ca77f518578df9f6db88e042d7f0336a
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

44 lines
1.2 KiB
Text

"use strict";
exports.startOfYesterday = startOfYesterday;
var _index = require("./constructNow.cjs");
var _index2 = require("./_core/getMonth.cjs");
var _index3 = require("./_core/getDate.cjs");
var _index4 = require("./_core/getFullYear.cjs");
var _index5 = require("./_core/setFullYear.cjs");
/**
* The {@link startOfYesterday} function options.
*/
/**
* @name startOfYesterday
* @category Day Helpers
* @summary Return the start of yesterday.
* @pure false
*
* @typeParam ContextDate - The `Date` type of the context function.
*
* @param options - An object with options
*
* @description
* Return the start of yesterday.
*
* @returns The start of yesterday
*
* @example
* // If today is 6 October 2014:
* const result = startOfYesterday()
* //=> Sun Oct 5 2014 00:00:00
*/
function startOfYesterday(options) {
const now = (0, _index.constructNow)(options?.in);
const year = (0, _index4.getFullYear)(now);
const month = (0, _index2.getMonth)(now);
const day = (0, _index3.getDate)(now);
const date = (0, _index.constructNow)(options?.in);
(0, _index5.setFullYear)(date, year, month, day - 1);
date.setHours(0, 0, 0, 0);
return date;
}