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:
parent
794938db72
commit
4d064adf1b
5397 changed files with 313100 additions and 365 deletions
31
node_modules/date-fns/isWeekend.js
generated
vendored
Normal file
31
node_modules/date-fns/isWeekend.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { toDate } from "./toDate.js";
|
||||
|
||||
/**
|
||||
* The {@link isWeekend} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name isWeekend
|
||||
* @category Weekday Helpers
|
||||
* @summary Does the given date fall on a weekend?
|
||||
*
|
||||
* @description
|
||||
* Does the given date fall on a weekend? A weekend is either Saturday (`6`) or Sunday (`0`).
|
||||
*
|
||||
* @param date - The date to check
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The date falls on a weekend
|
||||
*
|
||||
* @example
|
||||
* // Does 5 October 2014 fall on a weekend?
|
||||
* const result = isWeekend(new Date(2014, 9, 5))
|
||||
* //=> true
|
||||
*/
|
||||
export function isWeekend(date, options) {
|
||||
const day = toDate(date, options?.in).getDay();
|
||||
return day === 0 || day === 6;
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default isWeekend;
|
Loading…
Add table
Add a link
Reference in a new issue