Skip to main content

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):

Project details


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.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

TimeConvert-1.0.5-py2.7.egg (10.1 kB view details)

Uploaded Source

File details

Details for the file TimeConvert-1.0.5.tar.gz.

File metadata

File hashes

Hashes for TimeConvert-1.0.5.tar.gz
Algorithm Hash digest
SHA256 bfb1ce5d051f53ee0200c44a53dd0ce0aa1b676ac510a0ff60b61bd004cbeacd
MD5 4ae70a7f4cc7870cff1e02c718c54250
BLAKE2b-256 84985dd17ce4666e6cd1adf29bd6263d153e6d7a4290c6472148702f6028e72c

See more details on using hashes here.

File details

Details for the file TimeConvert-1.0.5-py2.7.egg.

File metadata

File hashes

Hashes for TimeConvert-1.0.5-py2.7.egg
Algorithm Hash digest
SHA256 9bdc1f56801a5abdf703c9d689217226fa9ded30f850e5b3f27698e70dac76d9
MD5 dc8590805b73c2ea60047fa681c72360
BLAKE2b-256 5a74b541a945956c8e96cf7bbbb512a35051e3198c89b58d053a02bbd6dd7c61

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page