BeautifulTime
BeautifulTime is a python package for converting date string, datetime, time and timestamp.
Install
pip install beautiful_time
Usage
import BeautifulTime
date_str = '2016-10-30 12:30:30'
dt = BeautifulTime.str2datetime(date_str)
# with a custom format
dt = BeautifulTime.str2datetime(date_str, format='%Y-%m-%d %H:%M:%S')
t = BeautifulTime.str2time(date_str)
ts = BeautifulTime.str2timestamp(date_str)
dt = BeautifulTime.str2datetime(date_str)
t = BeautifulTime.str2time(date_str)
ts = BeautifulTime.str2timestamp(date_str)
s = BeautifulTime.datetime2str(dt)
t = BeautifulTime.datetime2time(dt)
ts = BeautifulTime.datetime2timestamp(dt)
s = BeautifulTime.time2str(t)
dt = BeautifulTime.time2datetime(t)
ts = BeautifulTime.time2timestamp(t)
dt = BeautifulTime.timestamp2datetime(ts)
t = BeautifulTime.timestamp2time(ts)
s = BeautifulTime.timestamp2str(ts)
Metadata
Release files for beautiful-time 0.2
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 |
|---|---|---|---|---|
| beautiful-time-0.2.tar.gz | 2.0 kB | Without provenance | Details for beautiful-time-0.2.tar.gz |
Release files / beautiful-time-0.2.tar.gz
| Download URL | beautiful-time-0.2.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf382d55fce3315529fe79c9c5c08c3f23befbbd8d734fc0e2fcd8b65e27ffa1
|
|
BLAKE2b-256 checksum How to use checksums |
20cc1c53dc148d19641fa38fe9497fe86def7ffdba2597ef09ab793a77ebf024
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for beautiful-time 0.2
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.