Skip to main content

pypi version pypi download GitHub release GitHub All Releases GitHub last commit GitHub Workflow Status

WindowsLinuxUbuntuKaliFreeBSDDeepinDebianCent OS

What?

scidatetime is python module for DateTime handle.

Install

pip install scidatetime

Usage

from scidatetime import DateTime
# 当前时间
print(DateTime()) # 2023-09-19 14:50:43.570560+08:00
# 指定日期
print(DateTime('2023-09-19')) # 2023-09-19 00:00:00+08:00
# 指定时间
print(DateTime('2023-09-19 14:50:43')) # 2023-09-19 14:50:43+08:00
# 指定时间戳
print(DateTime(1695106243000)) # 2023-09-19 14:50:43+08:00
# 指定时间及时区
print(DateTime('2023-09-19T14:50:43+07:00')) # 2023-09-19 14:50:43+07:00

# 计算时间差
print((DateTime('2023-09-20') - '2023-09-19').total_seconds()) # 86400.0
print((DateTime('2023-09-20') - 60 * 1000)) # 2023-09-19 23:59:00+08:00

# 获取相对时间
print(DateTime('2023-09-20').toRelativeTime('2023-09-20 14:23')) # 14小时前
print(DateTime('2023-09-20 10:00:00').toRelativeTime('2023-09-20 10:01:00')) # 1分钟后
print(DateTime('2023-01-20 10:00:00').toRelativeTime()) # xxx年前

Status

Alt

Metadata

Release files for scidatetime 1.20.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scidatetime 1.20.5
File Size Uploaded
scidatetime-1.20.5.tar.gz 79.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scidatetime 1.20.5
File Interpreter ABI Platform
scidatetime-1.20.5-py3-none-any.whl Python 3 none any Details

Total release size: 165.0 kB

Release files / scidatetime-1.20.5.tar.gz

Download URL scidatetime-1.20.5.tar.gz
Size 79.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47e2cda9399e6d8b683b0b3c630870c523017d7bd6af7d557fe06d7856699e4e
BLAKE2b-256 checksum
How to use checksums
7274d1a1c76e7d4d1f319f47bc4970e45389568d3db668b2c55498e15ec3f3f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release files / scidatetime-1.20.5-py3-none-any.whl

Download URL scidatetime-1.20.5-py3-none-any.whl
Size 86.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62fa71c067bc97a25c4d446fa8a3f34dcbe8f6137f8301e06638ca94818085a9
BLAKE2b-256 checksum
How to use checksums
601a0a22b5e77c493f6cc82724dd5cf34cc447797a8fab3c9f03c647e9d03fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.20.5 This release

2 release files

1.20.3

2 release files

1.20.2

2 release files

1.19.6

2 release files

1.17.11

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page