Rocky_Mountain_Vending/.pnpm-store/v10/files/2e/f6e5638e31c114682c941df2bdd79e8754d0726edbbb5dfa0ef31a6d32334b6df3c71536ddcf0f78945afc4a73eb321a26bc2201966ff1d16755b95f9ccf73
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

31 lines
696 B
Text

"use strict";
exports.getQuarter = getQuarter;
var _index = require("./toDate.cjs");
/**
* The {@link getQuarter} function options.
*/
/**
* @name getQuarter
* @category Quarter Helpers
* @summary Get the year quarter of the given date.
*
* @description
* Get the year quarter of the given date.
*
* @param date - The given date
* @param options - An object with options
*
* @returns The quarter
*
* @example
* // Which quarter is 2 July 2014?
* const result = getQuarter(new Date(2014, 6, 2));
* //=> 3
*/
function getQuarter(date, options) {
const _date = (0, _index.toDate)(date, options?.in);
const quarter = Math.trunc(_date.getMonth() / 3) + 1;
return quarter;
}