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

holiday.cn

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

holiday.cn - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

16

lib/index.js

@@ -38,4 +38,3 @@ 'use strict';

'0909': '重阳',
'1208': '腊八',
'1230': '除夕'
'1208': '腊八'
};

@@ -64,2 +63,12 @@

/**
* `除夕`的判断,`春节`的前一天。
*/
var _chuxi = function _chuxi(date) {
var nextDate = new Date(date);
nextDate.setDate(date.getDate() + 1);
var lDate = solar2Lunar(nextDate).lunar;
return '0101' === _format(lDate.month) + _format(lDate.date);
};
var holidayCn = function holidayCn(date) {

@@ -79,2 +88,5 @@ var solar = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];

}
if (_chuxi(date)) {
ret.push('除夕');
}
}

@@ -81,0 +93,0 @@ if (solar) {

2

package.json
{
"name": "holiday.cn",
"version": "0.0.1",
"version": "0.0.2",
"description": "Get holidays in China:cn:.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -29,3 +29,2 @@ import Lunar from 'ilunar';

'1208': '腊八',
'1230': '除夕',
};

@@ -50,2 +49,12 @@

/**
* `除夕`的判断,`春节`的前一天。
*/
const _chuxi = date => {
const nextDate = new Date(date);
nextDate.setDate(date.getDate() + 1);
const lDate = solar2Lunar(nextDate).lunar;
return '0101' === (_format(lDate.month) + _format(lDate.date));
};
const holidayCn = (date, solar=true, lunar=true) => {

@@ -62,2 +71,5 @@ let ret = [];

}
if (_chuxi(date)) {
ret.push('除夕');
}
}

@@ -64,0 +76,0 @@ if (solar) {

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