Skip to main content

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

Project description

cn2date

Pypi Version

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

安装

pip install cn2date

使用

from cn2date import parse

parse("2023年").output()
# 输出结果:2023-01-01 00:00:00 - 2023-12-31 23:59:59.999999

parse("二零二三年十二月二十一日").output()
# 输出结果:2023-12-21 00:00:00 - 2023-12-21 23:59:59.999999

parse("今年").output()
# 输出结果:2024-01-01 00:00:00 - 2024-12-31 23:59:59.999999

parse("本季度").output()
# 输出结果:2024-01-01 00:00:00 - 2024-03-31 23:59:59.999999

许可证

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.1.1.tar.gz (21.5 kB view hashes)

Uploaded Source

Built Distribution

cn2date-0.1.1-py3-none-any.whl (24.2 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