JSPM

cron-chinese

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 126
  • Score
    100M100P100Q76747F
  • License MIT

cron to chinese humanizer

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

如何使用

npm install cron-chinese
import { 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