Skip to main content

datetime improvement for standard datetime.datetime

Project description

dtim

dtim – Python DateTime IMprovement

https://badge.fury.io/py/dtim.svg https://travis-ci.org/Gnouc/dtim.svg?branch=master

Installation

pip install dtim

Why dtim

Python standard datetime.datetime is awesome, but lack some of common methods like computing timestamps, checking naive, aware datetime easily.

dtim comes in for simplification.

Usage

from dtim import DateTime


dt = DateTime.now()

# Number of seconds since epoch
print dt.epoch()

# Check datetime is naive
print dt.is_naive()

# Check datetime is aware
print dt.is_aware()

Output:

1465591177.280863
True
False

Author

Cuong Manh Le cuong.manhle.vn@gmail.com

License

See LICENSE

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

dtim-0.0.2.0.tar.gz (3.0 kB view hashes)

Uploaded Source

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