Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cht8687/year-of-pig

Check if the year is year of pig in Chinese Zodiac
https://github.com/cht8687/year-of-pig

Last synced: 10 days ago
JSON representation

Check if the year is year of pig in Chinese Zodiac

Awesome Lists containing this project

README

        

# year-of-pig [![Build Status](https://travis-ci.org/cht8687/year-of-pig.svg?branch=master)](https://travis-ci.org/cht8687/year-of-pig)

> Check if is year of Pig

## Install

```
$ npm install --save year-of-pig
```

## Usage

```js

const yearOfPig = require('year-of-pig');

yearOfPig(1995);
// true

yearOfPig(1996);
// false

```
## API

### yearOfPig([year])

#### year

Type: `number`
Default: current year

### yearOfPig([date])

#### date

Type: `date`
Default: `new Date()`

## License

MIT © [haotian Chang](https://github.com/cht8687)