feat(server/script): enable a few dayjs plugins (closes #6080)

This commit is contained in:
Elian Doran
2025-06-26 20:13:01 +03:00
parent f32f9d4326
commit fe3350f39f
2 changed files with 53 additions and 4 deletions

View File

@@ -36,6 +36,17 @@ import type Becca from "../becca/becca-interface.js";
import type { NoteParams } from "./note-interface.js";
import type { ApiParams } from "./backend_script_api_interface.js";
// Dayjs plugins
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
import isBetween from "dayjs/plugin/isBetween";
import advancedFormat from "dayjs/plugin/advancedFormat.js";
dayjs.extend(isSameOrBefore);
dayjs.extend(isSameOrAfter);
dayjs.extend(isBetween);
dayjs.extend(advancedFormat);
/**
* A whole number
* @typedef {number} int