1.0.3 • Published 4 years ago

my-birthday-is v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

🎉 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';
    };
}
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago