Rocky_Mountain_Vending/.pnpm-store/v10/files/db/598cfb86cb7602481e701955657d67a2932baa84d542171334593cf0507bab7d15a4cbcfebb7ef1e52e153c7dcac33c7724c016683ef542f298d79555c1603
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

41 lines
1.1 KiB
Text

"use strict";
exports.differenceInHours = differenceInHours;
var _index = require("./_lib/getRoundingMethod.cjs");
var _index2 = require("./_lib/normalizeDates.cjs");
var _index3 = require("./constants.cjs");
/**
* The {@link differenceInHours} function options.
*/
/**
* @name differenceInHours
* @category Hour Helpers
* @summary Get the number of hours between the given dates.
*
* @description
* Get the number of hours between the given dates.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options.
*
* @returns The number of hours
*
* @example
* // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?
* const result = differenceInHours(
* new Date(2014, 6, 2, 19, 0),
* new Date(2014, 6, 2, 6, 50)
* )
* //=> 12
*/
function differenceInHours(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = (0, _index2.normalizeDates)(
options?.in,
laterDate,
earlierDate,
);
const diff = (+laterDate_ - +earlierDate_) / _index3.millisecondsInHour;
return (0, _index.getRoundingMethod)(options?.roundingMethod)(diff);
}