Files
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

52 lines
1019 B
JavaScript

import { transpose } from "../../transpose.mjs";
import { constructFrom } from "../../constructFrom.mjs";
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 DateToSystemTimezoneSetter extends Setter {
priority = TIMEZONE_UNIT_PRIORITY;
subPriority = -1;
set(date, flags) {
if (flags.timestampIsSet) return date;
return constructFrom(date, transpose(date, Date));
}
}