wucpeng-tools
Advanced tools
Comparing version
@@ -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)=> {}); |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31604
2.36%6
20%631
1.28%62
31.91%1
Infinity%