
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
parsetime-zhcn
Advanced tools
示例:
const pt = require('parsetime-zhcn');
console.log(pt.new('01月13号8:30am').toLocaleString())
console.log(pt.new('01月13号8:30pm').toLocaleString())
console.log(pt.new('01月13号早上8:30').toLocaleString())
console.log(pt.new('01月13号下午16:30').toLocaleString())
console.log(pt.new('2013年01月13日16:30:18').toLocaleString())
console.log(pt.new('2018-01-13 16:29:06').toLocaleString())
console.log(pt.new('10:10:10').toLocaleString())
console.log(pt.new('10:10').toLocaleString())
console.log(pt.new('10:10 pm').toLocaleString())
console.log(pt.new('下午10:10').toLocaleString())
console.log(pt.new('上午10:10 pm').toLocaleString())
console.log(pt.new('am 10:10').toLocaleString())
console.log(pt.new('pm 10:10').toLocaleString())
console.log(pt.new('1秒钟前').toLocaleString())
console.log(pt.new('1分钟前').toLocaleString())
console.log(pt.new('16天前').toLocaleString())
console.log(pt.new('1个月前').toLocaleString())
console.log(pt.new('1年前').toLocaleString())
console.log(pt.new('刚刚').toLocaleString())
推荐 moment.js
FAQs
将中文格式的时间字符串转换为Date类型
We found that parsetime-zhcn demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.