中文日期 、口语 转换为 日期字符串
Project description
cn2date
中文日期 、口语 转换为 日期字符串
安装
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
许可证
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
cn2date-0.1.1-py3-none-any.whl
(24.2 kB
view hashes)