Socket
Book a DemoInstallSign in
Socket

next-birthday

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

next-birthday

Returns the next birthday for the one passed

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

node-next-birthday Build Status

Returns the next birthday of the birthday passed.

Install

$ npm install --save next-birthday

Usage

var nextBirthday = require('next-birthday')
var birthday = new Date(1990, 5, 1)

nextBirthday.get(birthday)
//=> new Date(2016, 5, 1) 1st of June 2016

API

get(birthday[, today]))

birthday

Type: date

today [optional]

Type: date Default: new Date()

the first argument is the actual birthday we want to check and the second argument is optional and represents today's date to be taken as reference, mainly used for tesing purposes.

Leap years

Using leap-year to calculate the correct next birthdays for leap year bithrdays. Using the 28th of February.

Test

npm test

License

MIT

Keywords

birthday

FAQs

Package last updated on 15 Jun 2015

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