/** * The minimum age a date of birth must give, from the SDK configuration. VeroCompliance refuses a younger date of * birth itself (`ApplicantFlow.UnderMinimumAge`); these checks let the person see why before anything is sent. * * Internal: not exported from the utils barrel, which is public API. */ /** What applies when the configuration names no minimum age. */ export declare const DEFAULT_MINIMUM_AGE = 18; /** The oldest age a date of birth may give. */ export declare const MAXIMUM_AGE = 120; /** The code VeroCompliance answers with when it refuses a date of birth as too young. */ export declare const UNDER_MINIMUM_AGE_CODE = "ApplicantFlow.UnderMinimumAge"; /** * Whole years on `today`: a year is complete on the birthday, so someone born on 29 February is a year older on * 1 March when the year has no 29 February. Null for a date that can't be read. */ export declare function ageOn(dateOfBirth: string | null | undefined, today?: Date): number | null; /** The configuration's minimum age: its own value, or 18. 0 means no limit. */ export declare function minimumAgeOf(theme: { minimumAge?: number | null; } | null | undefined): number; /** * The range a date picker for a date of birth offers: from 120 years ago to the latest date that is old enough * (today itself when there is no minimum age). */ export declare function dateOfBirthRange(minimumAge: number, today?: Date): { min: string; max: string; }; /** * What is wrong with a date of birth, by age, or null. A date that can't be read isn't judged here: that is the * date input's business. */ export declare function dateOfBirthAgeProblem(dateOfBirth: string | null | undefined, minimumAge: number, today?: Date): { kind: 'minAge' | 'maxAge'; age: number; } | null; /** True when VeroCompliance refused a date of birth as too young. */ export declare function isUnderMinimumAgeRefusal(err: unknown): boolean; //# sourceMappingURL=age.d.ts.map