timepiece/node_modules/date-fns/parse/_lib/parsers/YearParser.d.mts

26 lines
673 B
TypeScript
Raw Normal View History

2024-05-14 14:54:12 +00:00
import type { Match } from "../../../locale/types.js";
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult } from "../types.js";
export interface YearParserValue {
year: number;
isTwoDigitYear: boolean;
}
export declare class YearParser extends Parser<YearParserValue> {
priority: number;
incompatibleTokens: string[];
parse(
dateString: string,
token: string,
match: Match,
): ParseResult<YearParserValue>;
validate<DateType extends Date>(
_date: DateType,
value: YearParserValue,
): boolean;
set<DateType extends Date>(
date: DateType,
flags: ParseFlags,
value: YearParserValue,
): DateType;
}