1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Show a report for total users chart

This commit is contained in:
Daniel Neto 2025-07-10 15:28:42 -03:00
parent 794938db72
commit 4d064adf1b
5397 changed files with 313100 additions and 365 deletions

42
node_modules/date-fns/differenceInHours.js generated vendored Normal file
View file

@ -0,0 +1,42 @@
import { getRoundingMethod } from "./_lib/getRoundingMethod.js";
import { normalizeDates } from "./_lib/normalizeDates.js";
import { millisecondsInHour } from "./constants.js";
/**
* 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
*/
export function differenceInHours(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
const diff = (+laterDate_ - +earlierDate_) / millisecondsInHour;
return getRoundingMethod(options?.roundingMethod)(diff);
}
// Fallback for modularized imports:
export default differenceInHours;