README
🎉 How Old am I Today?...
Age Calculator accurately calculates your exact age and gives the answer of How old am I?
Installation
npm i my-birthday-is
Usage
const { myBirthdayIs } = require('my-birthday-is');
myBirthdayIs({ year: 1998, month: 1, day: 18 });
/*
Object {
age
bornday
previousBirthday
nextBirthday
ageInSeconds
ageInMinutes
ageInHours
ageInDays
ageInWeeks
ageInMonths
}
*/
API
const myBirthdayIs: (birthdayDate: Birthday, birthdayConfig?: BirthdayConfig | undefined) => BirthdayResult
type Birthday = {
day: number;
month: number;
year: number;
}
type BirthdayConfig = {
locale: string;
options: {
weekday: 'long' | 'short';
year: 'numeric' | '2-digit';
month: 'long' | 'short';
day: 'numeric' | '2-digit';
};
}