Add OpenAPI docs, frontend, migrations, and API updates
- OpenAPI: add missing endpoints (add-from-url, subscriptions, public availability) - OpenAPI: CalendarSubscription schema, Subscriptions tag - Frontend app - Migrations: count_for_availability, subscriptions_sync, user_preferences, calendar_settings - Config, rate limit, auth, calendar, booking, ICS, availability, user service updates Made-with: Cursor
This commit is contained in:
47
frontend/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js
generated
vendored
Normal file
47
frontend/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import { setISOWeek } from "../../../setISOWeek.js";
|
||||
import { startOfISOWeek } from "../../../startOfISOWeek.js";
|
||||
import { numericPatterns } from "../constants.js";
|
||||
import { Parser } from "../Parser.js";
|
||||
|
||||
import { parseNDigits, parseNumericPattern } from "../utils.js";
|
||||
|
||||
// ISO week of year
|
||||
export class ISOWeekParser extends Parser {
|
||||
priority = 100;
|
||||
|
||||
parse(dateString, token, match) {
|
||||
switch (token) {
|
||||
case "I":
|
||||
return parseNumericPattern(numericPatterns.week, dateString);
|
||||
case "Io":
|
||||
return match.ordinalNumber(dateString, { unit: "week" });
|
||||
default:
|
||||
return parseNDigits(token.length, dateString);
|
||||
}
|
||||
}
|
||||
|
||||
validate(_date, value) {
|
||||
return value >= 1 && value <= 53;
|
||||
}
|
||||
|
||||
set(date, _flags, value) {
|
||||
return startOfISOWeek(setISOWeek(date, value));
|
||||
}
|
||||
|
||||
incompatibleTokens = [
|
||||
"y",
|
||||
"Y",
|
||||
"u",
|
||||
"q",
|
||||
"Q",
|
||||
"M",
|
||||
"L",
|
||||
"w",
|
||||
"d",
|
||||
"D",
|
||||
"e",
|
||||
"c",
|
||||
"t",
|
||||
"T",
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user