Skip to main content

大型正则解析时间

Project description

pyUnit_time

处理时间模块集合

安装

pip install pyunit-time

使用

from pyunit_time import CharactersTime

if __name__ == '__main__':
    nt = CharactersTime()
    np = nt.parse('今天晚上8点到明天上午10点之间')
    print(np)  # ['2019-12-09 20:00:00', '2019-12-10 10:00:00']
    np = nt.parse('今年儿童节晚上九点一刻')
    print(np)  # ['2019-06-01 21:15:00']
    np = nt.parse('今天中午十二点')
    print(np)  # ['2019-12-09 12:00:00']
    np = nt.parse('明年春节')
    print(np)  # ['2020-01-25 00:00:00']
    np = nt.parse('下下下个星期五早上7点半')
    print(np)  # ['2020-01-3 07:30:00']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyunit_time-2019.12.9-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file pyunit_time-2019.12.9-py3-none-any.whl.

File metadata

  • Download URL: pyunit_time-2019.12.9-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for pyunit_time-2019.12.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3d62cc097aecd6789af9f919bce37eedab6269d62669f62d03d4734a717258b8
MD5 2819a0616bbabe7bd0215032b968ac39
BLAKE2b-256 99c94705f8bff42c84276bdabd901ebb79b69a3a56a621f1b18870ce19ae5a99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page