Skip to content

UNIT_CODE

const UNIT_CODE: Record<DateUnit, string>;

Defined in: filters/url.ts:191

Date unit → short URL code (the inverse is unitFromCode). The compact codec writes these into a date-preset leaf’s u key.

import { UNIT_CODE } from "@xtandard/lib/filters";
UNIT_CODE.month; // → "mo"
UNIT_CODE.halfYear; // → "hy"