Skip to main content

提供了各种时间转换的方法

Project description

将 python 的 requests 代码转换成 curl 命令

安装

pip install time-util-wj

使用

from time_util_wj import TimeUtil

print(TimeUtil.get_current_time_str())  ###获取当前字符串格式化时间
print(TimeUtil.get_current_time_unix())  ###获取当前时间戳
print(TimeUtil.get_seven_days_ago_time_unix())
print(TimeUtil.str_time_to_unix("2022-07-07 20:28:50"))
print(TimeUtil.unix_time_to_str(1657197749260))
print(TimeUtil.get_recently_day(-7, 'unix'))
print(TimeUtil.get_day_begin_unix())
print(TimeUtil.get_day_end_unix(-4))
print(TimeUtil.get_month_datetime_begin(datetime.datetime.now()))
print(TimeUtil.get_month_datetime_end(datetime.datetime.now()))
print(TimeUtil.compare_time(datetime.datetime.fromisoformat('2022-07-01 00:00:00'),
                            datetime.datetime.fromisoformat('2022-05-31 23:59:59')))

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

time_util_wj-1.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

time_util_wj-1.0.4-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file time_util_wj-1.0.4.tar.gz.

File metadata

  • Download URL: time_util_wj-1.0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for time_util_wj-1.0.4.tar.gz
Algorithm Hash digest
SHA256 3b2e2ad9310f322c30dca7b47fdafea244624040340d419e62c4890d446e8705
MD5 c772db9068ea6f0a11d21c45affbd766
BLAKE2b-256 b0f8d2a677adddd8026a0249bb02d800823fd613983bd65a46cfc5764fa97558

See more details on using hashes here.

File details

Details for the file time_util_wj-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: time_util_wj-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for time_util_wj-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8a06320b4234f65d92f4accdb9ff34abd534d5de3e9ceeb01e9a2409615de55d
MD5 c319dbc50234e2674fdab5f8ed1abe0e
BLAKE2b-256 3daf5c6fba8287dd85638c956b7cd82127399069ead5ca17fce89935ab0dbc5d

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