中文日期 、口语 转换为 日期字符串
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.0b2.tar.gz
(19.8 kB
view details)
Built Distribution
cn2date-0.1.0b2-py3-none-any.whl
(26.3 kB
view details)
File details
Details for the file cn2date-0.1.0b2.tar.gz
.
File metadata
- Download URL: cn2date-0.1.0b2.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6343baf062add8a0bb92f79dc5a8a59d73ae6b09b6829544cdd69b0603e40030 |
|
MD5 | 481758cf65a61b8c0e6172d74f9c1c26 |
|
BLAKE2b-256 | a5f5c1f13cb5c1e16d541c533ce7b64a19cd08ae7ecb63ed0c17dbd4c1e43364 |
File details
Details for the file cn2date-0.1.0b2-py3-none-any.whl
.
File metadata
- Download URL: cn2date-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0797ab624fc2a647aef22cdf2c886f5231213b0d4b97e3fd83b7e0b8fe46b44d |
|
MD5 | a2ca23baf3d5a28407072e8864813191 |
|
BLAKE2b-256 | aa278f43befc7af6d1947ef686afe551ba327ca98f33d638a1a56a61867432bc |