Rocky_Mountain_Vending/.pnpm-store/v10/files/ed/e47a7dcce211319826159fae528b293757614af8e808a30066a978916afb64c0cf7010afef0c87a9ebf9a2ce64f73e18b2bf9dc3f30be436cc7ea09b9173fb
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

43 lines
1.1 KiB
Text

"use strict";
exports.differenceInCalendarYears = differenceInCalendarYears;
var _index = require("./_lib/normalizeDates.cjs");
var _index2 = require("./_core/getFullYear.cjs");
/**
* The {@link differenceInCalendarYears} function options.
*/
/**
* @name differenceInCalendarYears
* @category Year Helpers
* @summary Get the number of calendar years between the given dates.
*
* @description
* Get the number of calendar years between the given dates.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
* @returns The number of calendar years
*
* @example
* // How many calendar years are between 31 December 2013 and 11 February 2015?
* const result = differenceInCalendarYears(
* new Date(2015, 1, 11),
* new Date(2013, 11, 31)
* );
* //=> 2
*/
function differenceInCalendarYears(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = (0, _index.normalizeDates)(
options?.in,
laterDate,
earlierDate,
);
return (
(0, _index2.getFullYear)(laterDate_) -
(0, _index2.getFullYear)(earlierDate_)
);
}