Package Exports
- cron-chinese
- cron-chinese/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cron-chinese) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cron-chinese
一个将 Cron 转换为中文的工具。
如何使用
npm install cron-chineseimport { humanizeCronInChinese } from "cron-chinese";
humanizeCronInChinese('* * * * *'); // 每分钟
humanizeCronInChinese('0 0 * * *'); // 每日00:00
humanizeCronInChinese('0 0 1 * *'); // 每月1日00:00
humanizeCronInChinese('*/2 * * * *'); // 每隔2分钟
humanizeCronInChinese('45 4 1,10,20 * *') // 每月1,10,20日04:45更多示例请查看测试文件:index.spec.js