Skip to main content

timelib is a short wrapper around php’s internal timelib module. It currently only provides a few functions:

timelib.strtodatetime:

>>> timelib.strtodatetime('today')
datetime.datetime(2009, 6, 23, 0, 0)
>>> timelib.strtodatetime('today')
datetime.datetime(2009, 6, 23, 0, 0)
>>> timelib.strtodatetime('next friday')
datetime.datetime(2009, 6, 26, 0, 0)
>>> timelib.strtodatetime('29 feb 2008 -108 years')
datetime.datetime(1900, 3, 1, 0, 0)

timelib.strtotime:

>>> import time, timelib
>>> time.ctime(timelib.strtotime("now"))
'Tue Jun 23 15:17:32 2009'
>>> time.ctime(timelib.strtotime("4 hours ago"))
'Tue Jun 23 11:17:38 2009'
>>> time.ctime(timelib.strtotime("20080229 -1 year"))
'Thu Mar  1 01:00:00 2007'

Metadata

Release files for timelib 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timelib 0.2
File Size Uploaded
timelib-0.2.tar.gz 289.5 kB Details

Release files / timelib-0.2.tar.gz

Download URL timelib-0.2.tar.gz
Size 289.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9f0e6befb2792c22de6763b810ef6264493536f4cd49a2466adefca9c06dbf4b
BLAKE2b-256 checksum
How to use checksums
ee2678c27b2774ea8b3edf4e0ce4e67564428dbf653ee54a3fdbaa71bf833936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page