Registry / devops / timelib

timelib

JSON →
library0.3.0pypypi✓ verified 85d ago

Parse English textual date descriptions into timestamps. Current version 0.3.0, infrequently updated (latest release 2014). Suitable for simple natural language date parsing but not actively maintained.

pip install timelib
INSTALL
IMPORT
SIG · TIMELIB
T
timelib
devopspythonv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

timelib
import timelib
The library is a single module; no submodules.

Parse a textual date description like 'next friday' or 'in 2 days'. Returns a datetime object.

import timelib ts = timelib.strtodatetime('next friday') print(ts)
Debug
Known issues
gotchatimelib is not actively maintained; may have bugs with certain date descriptions.
fix
Consider alternatives like dateutil.parser or parsedatetime.
affects: all
gotchaThe library returns a datetime object, not a timestamp. Use timelib.strtotime() for Unix timestamps.
fix
For Unix timestamp: timelib.strtotime('next friday')
affects: all
Errors
Common errors & fixes
AttributeError: module 'timelib' has no attribute 'strtodatetime'
The function is named differently in older versions.
fix
Use timelib.strtodatetime() (note the 'd' in 'datetime').
ImportError: No module named timelib
timelib is not installed or Python environment issue.
fix
Run: pip install timelib
Upgrade
Version history
0.3.0latest on PyPI · released Mar 18, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
timelib — pip install timelib · libregistry