Time Convert for Humans
Project description
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=None, days): def several_days_coming(dt=None, days): def several_time_ago(dt=None, days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0): def several_time_coming(dt=None, days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0): # 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): # TIME_DELTA def timestamp_delta(stamp1, stamp2): def datetime_delta(dt1, dt2): 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): # OTHER def total_seconds(td): # timedelta
Project details
Release history Release notifications | RSS feed
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.6.tar.gz
(4.9 kB
view details)
Built Distribution
TimeConvert-1.0.6-py2.7.egg
(10.3 kB
view details)
File details
Details for the file TimeConvert-1.0.6.tar.gz
.
File metadata
- Download URL: TimeConvert-1.0.6.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bdf28b526d5bf79bf5b39103c4aaf477d5c257f99a4617326b53bdfa013e2eb |
|
MD5 | 8ca2b29ce1167edcb5bfc357ac3e1754 |
|
BLAKE2b-256 | b5e92089b757586d53931ac7bbcc13ce6d58d5235dce9a9279d3c0c9c4a54aca |
File details
Details for the file TimeConvert-1.0.6-py2.7.egg
.
File metadata
- Download URL: TimeConvert-1.0.6-py2.7.egg
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1cbb6d76419e5add55e788fc71baac60c12b86fcddde61c1c223ece7a52eb1 |
|
MD5 | 72858590f5729ab896eda18aa6babb90 |
|
BLAKE2b-256 | eed4f4b2906d7c12ea11910f9b102a8ef32b9edef67aa21717461dda88d3e35f |