# @narendrayogi/how-old

> Gets how old birthdate to a date.

Latest version **1.0.0** (published 2021-02-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @narendrayogi/how-old
pnpm add @narendrayogi/how-old
yarn add @narendrayogi/how-old
bun add @narendrayogi/how-old
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-02-01 |
| First published | 2021-02-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Narendran VR |
| Maintainers | narendrayogi |
| Keywords | age, calculator, years, months, days |

## Links

- npm: https://www.npmjs.com/package/@narendrayogi/how-old
- Repository: https://github.com/narendrayogi/how-old
- Homepage: https://github.com/narendrayogi/how-old#readme
- Issues: https://github.com/narendrayogi/how-old/issues
- npm.io page: https://npm.io/package/@narendrayogi/how-old

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-02-01

## README

`how-old` gives how old from birthdate to any date. Not just previous dates from birthdate.

# Examples

## Example 1 - One day before birthday

```js
new Date(2019, 1, 2), new Date(2020, 1, 1);
```

```js
{ years: 0, months: 11, days: 30 }
```

## Example 2 - On birthday

```js
new Date(2019, 1, 2), new Date(2020, 1, 1);
```

```js
{ years: 0, months: 11, days: 30 }
```

## Example 3 - One day after birthday

```js
new Date(2019, 1, 2), new Date(2020, 1, 1);
```

```js
{ years: 0, months: 11, days: 30 }
```

---
_Source: https://npm.io/package/@narendrayogi/how-old · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
