中文日期 、口语 转换为 日期字符串
Project description
cn2date
中文日期 、口语 转换为 日期字符串
安装
pip install cn2date
使用
from cn2date import parse
result = parse("2021年")
# 输出结果:('2021-01-01 00:00:00', '2022-01-01 00:00:00')
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 00:00:00', '2022-04-01 00:00:00')
许可证
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.0b1.tar.gz
(19.6 kB
view hashes)
Built Distribution
cn2date-0.1.0b1-py3-none-any.whl
(25.8 kB
view hashes)
Close
Hashes for cn2date-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 027f628f14ee40f1233e941dfb592b4c6098872c6f59ebc6c36d4e1c8d07a5f4 |
|
MD5 | 1ce3dc724d08312fb9c3908a8464ded8 |
|
BLAKE2b-256 | 840bf68bb99cb970729ba090a039e344d54222bc6afc3c813f5a3e9dc5d2a4bd |