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

# 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.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

TimeConvert-1.0.2-py2.7.egg (9.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: TimeConvert-1.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for TimeConvert-1.0.2.tar.gz
Algorithm Hash digest
SHA256 2a95053c91be0ec3fafc2d5e41bf34a9e07e6b4fb41ea6612f95ed57a55c6bae
MD5 55003165c1addfed409b3f7955b1b617
BLAKE2b-256 9a198c01e08cf8dedc55387b98ea32e0414d1c1a9b6f00b8ca7c6537ce277e23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TimeConvert-1.0.2-py2.7.egg
Algorithm Hash digest
SHA256 609c947cef6c7aed8e0c0639da7a19615bf192b10feff38f6c12819fed25ef96
MD5 e8029abcd936c47fc358f12f6425f12d
BLAKE2b-256 8a29df0f957055a1bbb1116b04aca3ca04c43a4338b999b438ecb00bed8f60ef

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