You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

wucpeng-tools

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wucpeng-tools - npm Package Compare versions

Comparing version

to
1.0.4

zip.js

19

calendar.js

@@ -567,15 +567,2 @@ /**

/**
* 取星座, 参数分别是 月份和日期
* @param month
* @param day
* @returns {*}
*/
// let calcConstellation = (month, day)=> {
// var d = new Date(1999, month - 1, day, 0, 0, 0);
// for(var i= constellationArr.length - 1; i >= 0; i--){
// if (d >= constellationArr[i][1]) return constellationArr[i][0];
// }
// };
exports.getConstellation = (date)=> {

@@ -586,6 +573,2 @@ var d = new Date(1999, date.getMonth(), date.getDate(), 0, 0, 0);

}
};
//console.log(calendar.solar2lunar(1986,3,7));
//console.log(calendar.lunar2solar(1986,1,27));
console.log(exports.getConstellation(new Date()));
};
module.exports.holiday = require('./holiday.js');
module.exports.calendar = require('./calendar.js');
module.exports.calendar = require('./calendar.js');
module.exports.zip = require('./zip.js');
{
"name": "wucpeng-tools",
"version": "1.0.3",
"version": "1.0.4",
"description": "time date holiday lunar",

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

@@ -11,38 +11,53 @@ ## wucpeng-tools ##

## Feature holiday##
## Feature holiday ##
holiday 判断假期 需要每年添加 供当前公司场景使用
const tools = require('wucpeng-tools');
const holiday = tools.holiday;
let time = new Date();
console.log(holiday.isHolidayDate(now));
console.log(holiday.isHolidayDate(time));
## Feature calendar ##
const tools = require('wucpeng-tools');
const calendar = tools.calendar;
let time = new Date();
console.log(calendar.solar2lunarDate(1986,3,7));
{
lYear: 1986,
lMonth: 1,
lDay: 27,
Animal: '虎',
IMonthCn: '正月',
IDayCn: '廿七',
cYear: 1986,
cMonth: 3,
cDay: 7,
gzYear: '丙寅',
gzMonth: '辛卯',
gzDay: '庚戌',
isToday: false,
isLeap: false,
nWeek: 5,
ncWeek: '星期五',
isTerm: false,
Term: null,
astro: '双鱼座'
}
console.log(calendar.solar2lunarDate(time));
{
lYear: 1986,
lMonth: 1,
lDay: 27,
Animal: '虎',
IMonthCn: '正月',
IDayCn: '廿七',
cYear: 1986,
cMonth: 3,
cDay: 7,
gzYear: '丙寅',
gzMonth: '辛卯',
gzDay: '庚戌',
isToday: false,
isLeap: false,
nWeek: 5,
ncWeek: '星期五',
isTerm: false,
Term: null,
astro: '双鱼座'
}
## Feature zip ##
const tools = require('wucpeng-tools');
const zip = tools.zip;
zip.zipFilePwd(workPath, fileName, pwd, (err)=> {});
zip.zipFile(workPath, fileName, (err)=> {});