refactor: worker select & employee nationality

This commit is contained in:
puriphatt 2024-10-03 18:10:40 +07:00
parent 8006314ce4
commit 9d745d8e52
5 changed files with 100 additions and 52 deletions

View file

@ -21,7 +21,7 @@ export function dateFormat(
if (time) return m.format('HH:mm');
if (number) {
let formattedNumberDate = m.format('L');
const formattedNumberDate = m.format('L');
return formattedNumberDate;
}
@ -60,6 +60,11 @@ export function toISOStringWithTimezone(date: Date) {
);
}
export function calculateAge(birthDate: Date | null | string): string;
export function calculateAge(
birthDate: Date | null | string,
only: 'year' | 'months' | 'days',
): number;
export function calculateAge(
birthDate: Date | null | string,
only?: 'year' | 'months' | 'days',