New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kh71-age-calculator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kh71-age-calculator

This repository will help you to get exact age and minor or adulst status from date string.

  • 0.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

This Package fork form full-age-calculator by akhilsky.

README

This Package will help you to get exact age and minor or adulst status from Date of Birth to current Date or some other Date.

Install

npm i -S kh71-age-calculator

Usage

How to Get Full Age(Years,Months & Days)

Get full age on current Date
var calculateFullAge = require('kh71-age-calculator');

var getfullAge = calculateFullAge.getFullAge('birthDate'); // In yyyy-mm-dd format. example: 1998-12-25
console.log(getfullAge)
Output
{ "years":xx, "months":xx, "days":xx }
Get full age on some other Date

var getfullAge = calculateFullAge.getFullAge('birthDate','otherDate'); // In yyyy-mm-dd format. Example: 1999-12-25, 2022-10-31
console.log(getfullAge)
Output
{ "years": 22, "months": 10, "days": 6 }

How to Get Full Age Status(Minor/Adult)

Get Age Status on current Date
var ageStatus = calculateFullAge.getAgeStatus('birthDate'); In yyyy-mm-dd format. Example: 1999-12-25
console.log(ageStatus);
Output
output: "Adult"
Get Age Status on some other Date
var ageStatus = calculateFullAge.getAgeStatus('birthDate','otherDate'); In yyyy-mm-dd format. example: 1998-12-25, 2022-10-31
console.log(ageStatus);
Output
output: "Adult"

License

MIT

Keywords

FAQs

Package last updated on 01 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc