UNPKG

age-calculator-utils

Version:

Simple age calculation utility for JavaScript/TypeScript

11 lines (10 loc) 348 B
interface AgeResult { years: number; months: number; weeks: number; days: number; } export declare function isLeapYear(year: number): boolean; export declare function getDaysInMonth(year: number, month: number): number; export declare function calculateAge(startDate: string, endDate: string): AgeResult; export type { AgeResult };