1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +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

32
node_modules/date-fns/daysToWeeks.js generated vendored Normal file
View file

@ -0,0 +1,32 @@
import { daysInWeek } from "./constants.js";
/**
* @name daysToWeeks
* @category Conversion Helpers
* @summary Convert days to weeks.
*
* @description
* Convert a number of days to a full number of weeks.
*
* @param days - The number of days to be converted
*
* @returns The number of days converted in weeks
*
* @example
* // Convert 14 days to weeks:
* const result = daysToWeeks(14)
* //=> 2
*
* @example
* // It uses trunc rounding:
* const result = daysToWeeks(13)
* //=> 1
*/
export function daysToWeeks(days) {
const result = Math.trunc(days / daysInWeek);
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Fallback for modularized imports:
export default daysToWeeks;