@hhgtech/hhg-components
Version:
Hello Health Group common components
15 lines (14 loc) • 443 B
TypeScript
import dayjs from 'dayjs';
export declare const calcAge: (value: Date) => {
birthDate: dayjs.Dayjs;
today: dayjs.Dayjs;
age: number;
};
/**
* Temporary hard the range of age from 1 -> 6 for Durgo Campaign at this time
* Ticket: https://hhgdev.atlassian.net/browse/HTO-1327
*/
export declare const validateAge: (value: Date, errMsg: string, conditions?: [{
from?: number;
to?: number;
}]) => string | true;