Skip to main content

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

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')

许可证

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.0b1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

cn2date-0.1.0b1-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file cn2date-0.1.0b1.tar.gz.

File metadata

  • Download URL: cn2date-0.1.0b1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cn2date-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 73bc997bc1e5f1b1254b1c4f83392f60ed3ee9777d98e6030a0da1975ace9d68
MD5 41dd0f12eb41fb8ffeb9ce72e9c4518a
BLAKE2b-256 8feb8db553b49595ced1b5a54cd426cfbc9d852f53aaf3aee329e593408fd6a1

See more details on using hashes here.

File details

Details for the file cn2date-0.1.0b1-py3-none-any.whl.

File metadata

  • Download URL: cn2date-0.1.0b1-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for cn2date-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 027f628f14ee40f1233e941dfb592b4c6098872c6f59ebc6c36d4e1c8d07a5f4
MD5 1ce3dc724d08312fb9c3908a8464ded8
BLAKE2b-256 840bf68bb99cb970729ba090a039e344d54222bc6afc3c813f5a3e9dc5d2a4bd

See more details on using hashes here.

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