Skip to main content

中文日期 、口语 转换为 日期字符串

Project description

cn2date

中文日期 、口语 转换为 日期字符串

安装

pip install cn2date

使用

from cn2date import parse

result = parse("二零二一年九月十七日")
# 输出结果:('2021-09-17 00:00:00', '2021-09-18 00:00:00')

result = parse("今天")
# 输出结果:('2022-02-23 00:00:00', '2022-02-24 00:00:00')

result = parse("本季度")
# 输出结果:('2022-01-01 11:43:31', '2022-04-01 11:43:31')

许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cn2date-0.0.4.tar.gz (13.4 kB view hashes)

Uploaded Source

Built Distribution

cn2date-0.0.4-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page