import { IModelParseContext, IModelTypeConstraint } from "./model.api"; import { ModelConstraints, ModelTypeConstraintOptional, ModelTypeItem } from "./model.base"; export declare class ModelTypeDate extends ModelTypeItem { constructor(name?: string, c?: ModelConstraints); lowerBound(): IModelTypeConstraint; upperBound(): IModelTypeConstraint; parse(ctx: IModelParseContext): Date; validate(ctx: IModelParseContext): void; unparse(value: Date): any; create(): Date; fromString(val: string): Date; asString(val: Date): string; protected _kind(): string; } export declare abstract class ModelTypeConstraintDateBase extends ModelTypeConstraintOptional { constructor(); get value(): Date; protected _id(): string; protected _op(): string; protected _compare(a: Date, b: Date): boolean; protected _val(): Date; protected _limit(): any; protected _code(): string; asDate(val: Date | string): Date; checkAndAdjustValue(val: D, ctx: IModelParseContext): D; } export declare abstract class ModelTypeConstraintDateFixed extends ModelTypeConstraintDateBase { constructor(val: Date | string | ModelTypeConstraintDateFixed); _val(): Date; _limit(): Date; private _value; } export declare class ModelTypeConstraintBefore extends ModelTypeConstraintDateFixed { constructor(val: Date | string); protected _op(): string; protected _compare(a: Date, b: Date): boolean; protected _code(): string; protected static _adjust(d: Date | string): Date | string; } export declare class ModelTypeConstraintAfter extends ModelTypeConstraintDateFixed { constructor(val: Date | string); protected _op(): string; protected _compare(a: Date, b: Date): boolean; protected _code(): string; protected static _adjust(d: Date | string): Date | string; } export type TimeSpanUnit = 'year' | 'years' | 'y' | 'month' | 'months' | 'm' | 'day' | 'days' | 'd' | string; export type TimeSpanUnitNormalized = 'year' | 'month' | 'day' | 'invalid'; export declare class TimeSpan { constructor(timespan: string); toString(): string; get amount(): number; get unit(): TimeSpanUnit; get unitNormalized(): TimeSpanUnitNormalized; moveBack(date: Date): void; moveForward(date: Date): void; _unit: TimeSpanUnit; _unitNormalized: TimeSpanUnitNormalized; _amount: number; private static REGEX; } export declare class ModelTypeConstraintOlder extends ModelTypeConstraintDateBase { constructor(timespan: string); protected _op(): string; protected _compare(a: Date, b: Date): boolean; protected _limit(): TimeSpan; protected _val(): Date; protected _code(): string; private _timespan; } export declare class ModelTypeConstraintYounger extends ModelTypeConstraintDateBase { constructor(timespan: string); protected _op(): string; protected _compare(a: Date, b: Date): boolean; protected _limit(): TimeSpan; protected _val(): Date; protected _code(): string; private _timespan; }