# accurateagecalculator

> JavaScript Library which accepts the date in Date or string (dd/mm/yyyy or dd.mm.yyyy or dd-mm-yyyy) and returns the completed age in year, if sent date is valid otherwise returns string "invalid age"

Latest version **1.0.4** (published 2019-08-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install accurateagecalculator
pnpm add accurateagecalculator
yarn add accurateagecalculator
bun add accurateagecalculator
```

## 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.4 |
| Published | 2019-08-13 |
| First published | 2019-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Netra Amrale |
| Maintainers | neetra |
| Keywords | modules, stdlib, util, utility, node, age calculator, calculator |

## Links

- npm: https://www.npmjs.com/package/accurateagecalculator
- Repository: https://github.com/neetra/agecalculator
- Homepage: https://github.com/neetra/agecalculator#readme
- Issues: https://github.com/neetra/agecalculator/issues
- npm.io page: https://npm.io/package/accurateagecalculator

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2019-08-13
- 1.0.3 — 2019-08-13
- 1.0.2 — 2019-08-13
- 1.0.1 — 2019-08-13
- 1.0.0 — 2019-08-13

## README

# agecalculator
A modern javascript library for calculating exact completed age in years, for the given birth date either in string or Date format.

## Description
A javascript library  which returns the completed age in years.
It accepts the date in string (dd/mm/yyyy or dd.mm.yyyy or dd-mm-yyyy) or date format.
In case of invalid date, string "invalid age" is returned.

## Installation
```bash
  npm install accurateagecalculator
```

##Usage
```javascript

	//Use the npm package, use require not IMPORT.
	var calculateAge = require('accurateagecalculator')
	
	//Valid date in string format 'dd/mm/yyyy'
	console.log(calculateAge(29/02/2000))
	//Output 19
	
	
	//Valid date in string format 'dd-mm-yyyy'
	console.log(calculateAge(30/01/1995))
	//Output 24
	
	
	//Valid date in string format 'dd.mm.yyyy'
	console.log(calculateAge(20/05/1994))
	//Output 25
	
	
	//Valid date in string format 'dd/mm/yyyy'
	console.log(calculateAge(30/02/2000))
	//Output "invalid age"
	
	
	//Valid date in string format 'dd/mm/yyyy'
	console.log(calculateAge(new Date(1995, 11, 17)))
	//Output 23	
```	
	
## Contributing

If you find a bug or requesting to add some extra features,then please email to amrale.netra@gmail.com

## Release History

* 1.0.0 Initial release
* 1.0.1 Changed the read me
* 1.0.2 Edited ReadME.md
* 1.0.3 Formatting ReadME
* 1.0.4 Editing ReadME.md

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