TimeConvert is a simple time convert script(library) for Python, built for human beings.
Installation
pip install TimeConvert
Usage
from TimeConvert import TimeConvert as tc tc.utc_timestamp()
Method
# DATETIME def utc_datetime(): def local_datetime(): def to_utc_datetime(local_dt, timezone=TIME_ZONE): def to_local_datetime(utc_dt, timezone=TIME_ZONE): def yesterday_utc_datetime(): def tomorrow_utc_datetime(): def yesterday_local_datetime(): def tomorrow_local_datetime(): def several_days_ago(dt, days): def several_days_coming(dt, days): # STRING def utc_string(utc_dt=None, format=TIME_FORMAT): def local_string(local_dt=None, format=TIME_FORMAT): def datetime_to_string(dt, format=TIME_FORMAT): # TIMESTAMP def utc_timestamp(utc_dt=None): def local_timestamp(local_dt=None): def datetime_to_timestamp(dt): # STRING ==> DATETIME def string_to_utc_datetime(string, format=TIME_FORMAT): def string_to_local_datetime(string, format=TIME_FORMAT): # STRING ==> TIMESTAMP def string_to_timestamp(string, format=TIME_FORMAT): def string_to_utc_timestamp(string, format=TIME_FORMAT): def string_to_local_timestamp(string, format=TIME_FORMAT): # OTHERS def string_delta(string1, string2, format=TIME_FORMAT, format1='', format2=''): # AWARE vs NAIVE def is_aware(value): def is_naive(value): def make_aware(value, timezone=TIME_ZONE): def make_naive(value, timezone=TIME_ZONE):
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TimeConvert-1.0.0.tar.gz
(1.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
TimeConvert-1.0.0-py2.7.egg
(1.6 kB
view details)
File details
Details for the file TimeConvert-1.0.0.tar.gz.
File metadata
- Download URL: TimeConvert-1.0.0.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a8a89819f2b99b0c764f041f0667777685396ae1ca108349a8893df4677a5b3
|
|
| MD5 |
11a6cbe3a8b0424508ad5e81169d94f0
|
|
| BLAKE2b-256 |
0b1f717c98397c635e57c773474b6209f87e0622409441d3ab806fbd000941d0
|
File details
Details for the file TimeConvert-1.0.0-py2.7.egg.
File metadata
- Download URL: TimeConvert-1.0.0-py2.7.egg
- Upload date:
- Size: 1.6 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b5b63ce9ea07b81988021b0c2e17d2fa2eff1c749568837c63a07b9ced92f2f
|
|
| MD5 |
7697a4d6a2fb0f4930dd9f46d52d89f3
|
|
| BLAKE2b-256 |
376156c38345248dd64697daa17fba22999b7b60dd295d13eb838778301927ef
|