mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 02:09:22 +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
57
node_modules/date-fns/parse/_lib/Setter.js
generated
vendored
Normal file
57
node_modules/date-fns/parse/_lib/Setter.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
import { constructFrom } from "../../constructFrom.js";
|
||||
import { transpose } from "../../transpose.js";
|
||||
|
||||
const TIMEZONE_UNIT_PRIORITY = 10;
|
||||
|
||||
export class Setter {
|
||||
subPriority = 0;
|
||||
|
||||
validate(_utcDate, _options) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class ValueSetter extends Setter {
|
||||
constructor(
|
||||
value,
|
||||
|
||||
validateValue,
|
||||
|
||||
setValue,
|
||||
|
||||
priority,
|
||||
subPriority,
|
||||
) {
|
||||
super();
|
||||
this.value = value;
|
||||
this.validateValue = validateValue;
|
||||
this.setValue = setValue;
|
||||
this.priority = priority;
|
||||
if (subPriority) {
|
||||
this.subPriority = subPriority;
|
||||
}
|
||||
}
|
||||
|
||||
validate(date, options) {
|
||||
return this.validateValue(date, this.value, options);
|
||||
}
|
||||
|
||||
set(date, flags, options) {
|
||||
return this.setValue(date, flags, this.value, options);
|
||||
}
|
||||
}
|
||||
|
||||
export class DateTimezoneSetter extends Setter {
|
||||
priority = TIMEZONE_UNIT_PRIORITY;
|
||||
subPriority = -1;
|
||||
|
||||
constructor(context, reference) {
|
||||
super();
|
||||
this.context = context || ((date) => constructFrom(reference, date));
|
||||
}
|
||||
|
||||
set(date, flags) {
|
||||
if (flags.timestampIsSet) return date;
|
||||
return constructFrom(date, transpose(date, this.context));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue