python-dateutil

Powerful extensions to Python's datetime module. dateutil adds smart date parsing (parser.parse('March 15, 2024') → datetime), relative delta arithmetic (relativedelta(months=1, days=-1)), timezone handling (tz.gettz('America/New_York')), and iCalendar recurrence rule support (rrule). The go-to library when Python's stdlib datetime isn't flexible enough for real-world date inputs and calendar calculations.

Evaluated Mar 06, 2026 (0d ago) v2.x
Homepage ↗ Repo ↗ Developer Tools python datetime parsing timezone rrule isoformat open-source
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
89
/ 100
Is it safe for agents?
⚡ Reliability
86
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
78
Auth Simplicity
100
Rate Limits
98

🔒 Security

TLS Enforcement
90
Auth Strength
90
Scope Granularity
88
Dep. Hygiene
85
Secret Handling
90

Local library — no network calls. No security concerns for the library itself.

⚡ Reliability

Uptime/SLA
85
Version Stability
88
Breaking Changes
88
Error Recovery
85
AF Security Reliability

Best When

You need to parse diverse real-world date strings without knowing the format, or need relative date arithmetic that Python's timedelta doesn't handle (months, years, business days).

Avoid When

Your dates are always in a known format (use strptime) or you need timezone-aware datetime objects in a modern Python 3.9+ codebase (use zoneinfo).

Use Cases

  • Parse agent user inputs and log timestamps in any format — parser.parse() handles ISO 8601, US dates, natural language dates without a format string
  • Calculate relative dates for agent scheduling — 'next month', '3 business days from now' using relativedelta for natural date arithmetic
  • Convert between timezones in agent workflows — tz.gettz() provides IANA timezone database access without pytz dependency
  • Parse RSS/Atom feed dates and HTTP Last-Modified headers in agent content ingestion pipelines
  • Implement recurring event logic for agent scheduling with rrule — daily, weekly, monthly recurrence with exceptions

Not For

  • Performance-critical datetime parsing at scale — parser.parse() is slow for bulk parsing; use fastdatetime or pre-compiled strptime format strings
  • Production timezone handling at scale — consider zoneinfo (Python 3.9+ stdlib) or pendulum for more modern timezone management
  • Simple datetime formatting — Python's strftime/strptime handles fixed-format cases without dateutil

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no external auth or network calls.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Apache 2.0 licensed open source Python package.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • parser.parse() makes assumptions for ambiguous dates — '01/02/03' is Jan 2, 2003 in US locale by default; use dayfirst=True or yearfirst=True for non-US date formats
  • parser.parse() on arbitrary strings can parse nonsense — 'meeting at 3pm tomorrow' returns today+1 at 15:00; validate parsed dates make sense for the context
  • relativedelta months=1 for Jan 31 → Feb 28 (not March 2) — dateutil handles month-end correctly, unlike adding timedelta(days=31) which overshoots
  • tz.gettz() returns None for unknown timezone names rather than raising an exception — agent code must check for None before using the returned timezone
  • dateutil tz objects are not JSON-serializable — serialize timezone-aware datetimes as ISO 8601 strings (dt.isoformat()) before storing or transmitting from agents
  • parser.parse() with tzinfos parameter overrides timezone abbreviations — 'EST' defaults to UTC-5 but can mean different things; always provide explicit tzinfos for critical agent timezone handling

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for python-dateutil.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-06.

5229
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered