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
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scidatetime-1.20.5.tar.gz | 79.0 kB | Without provenance | Details for scidatetime-1.20.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scidatetime-1.20.5-py3-none-any.whl | Python 3 | none | any | Details for scidatetime-1.20.5-py3-none-any.whl |
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
|
Security for scidatetime 1.20.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.