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/cuonglm/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.

NOTE

I wrote dtim before I know maya

You should use it, it’s great.

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

Uploaded Source

File details

Details for the file dtim-0.0.2.1.tar.gz.

File metadata

  • Download URL: dtim-0.0.2.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.12

File hashes

Hashes for dtim-0.0.2.1.tar.gz
Algorithm Hash digest
SHA256 ccf24a6421cb3553c6c45a78c0a15502723404dfda5bc5a13841ca33c90e848a
MD5 0936697fcc804c6968c4826c45bed1a8
BLAKE2b-256 db3a43ec72c3fce071e7e4870e75e4bb5aa946fd034dfeea6913dc3f641dde54

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