arrow
Better dates and times for Python — human-friendly datetime library with timezone-aware objects and natural language parsing. arrow features: arrow.now() for current time with timezone, arrow.get() for parsing from strings/timestamps/ISO 8601, arrow.utcnow() for UTC, .to('US/Pacific') for timezone conversion, .shift(hours=+3, days=-1) for date arithmetic, .humanize() for 'an hour ago' style output, .format('YYYY-MM-DD HH:mm:ss') for strftime-style formatting, .span('day') for day start/end bounds, .floor('hour') / .ceil('hour') for rounding, date range generation, and factory functions. Replaces datetime + pytz + dateutil.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Pure datetime library with no network calls. No security concerns. Parsing user-provided date strings: arrow.get() with format string is safer than auto-detection; auto-detection may produce unexpected results from adversarial input.
⚡ Reliability
Best When
General-purpose datetime handling with timezone support and human-friendly API — arrow replaces the datetime+pytz+dateutil combo with one clean library.
Avoid When
High-performance bulk date operations (use numpy/pandas), complex recurrence rules (use dateutil.rrule), or when stdlib datetime is sufficient.
Use Cases
- • Agent current time with timezone — import arrow; now = arrow.now('US/Eastern'); utc = arrow.utcnow(); pacific = now.to('US/Pacific'); print(now.format('YYYY-MM-DD HH:mm:ss ZZ')) — timezone-aware now; agent gets current time in any timezone; .to() converts between timezones; format() uses Moment.js-style tokens
- • Agent parse any format — ts = arrow.get('2024-01-15 14:30:00', 'YYYY-MM-DD HH:mm:ss'); iso = arrow.get('2024-01-15T14:30:00Z'); unix = arrow.get(1705328400); relative = arrow.get('yesterday') — flexible parsing; agent parses dates from various sources; arrow.get() auto-detects ISO 8601; pass format string for custom formats
- • Agent time arithmetic — now = arrow.now(); future = now.shift(days=+7, hours=+3); past = now.shift(months=-2); next_monday = now.shift(weekday=0) — date math; agent computes future/past dates; shift() supports years/months/weeks/days/hours/minutes/seconds/microseconds; weekday=0 means next Monday
- • Agent humanize output — created = arrow.get('2024-01-15'); print(created.humanize()) — '2 months ago'; precise = created.humanize(granularity=['day', 'hour']) — '45 days 3 hours ago'; agent formats timestamps for user display; humanize() auto-selects appropriate granularity; locale= for non-English
- • Agent date range — start = arrow.get('2024-01-01'); end = arrow.get('2024-01-31'); for day in arrow.Arrow.range('day', start, end): process(day.date()) — date iteration; agent iterates over date ranges; range() supports 'hour', 'day', 'week', 'month', 'quarter', 'year'; span_range() for overlapping spans
Not For
- • High-performance datetime processing — arrow is pure Python; for fast bulk date operations use numpy datetime64 or pandas Timestamp
- • Precise financial calculations — arrow uses floating point for some operations; for financial date math use python-dateutil with explicit rules
- • Complex recurrence rules — arrow lacks RFC 5545 recurrence; use dateutil.rrule for complex scheduling
Interface
Authentication
No auth — datetime library.
Pricing
arrow is Apache 2.0 licensed. Free for all use.
Agent Metadata
Known Gotchas
- ⚠ arrow.get() with ambiguous date strings — arrow.get('01/02/03') is ambiguous (day/month/year order?); arrow assumes MDY for ambiguous formats; agent code: always pass explicit format string for non-ISO dates: arrow.get('01/02/2024', 'MM/DD/YYYY'); or use ISO 8601 strings which are unambiguous
- ⚠ shift() months/years is calendar-aware — arrow.get('2024-01-31').shift(months=+1) returns '2024-02-29' (leap year) or '2024-02-28'; months behave like calendar months not 30-day periods; agent code expecting fixed 30-day months should use shift(days=+30) instead of shift(months=+1)
- ⚠ humanize() is relative to now — arrow.get('2024-01-01').humanize() output changes as time passes; agent code generating static reports should use .format() not .humanize(); humanize() with other= parameter: a.humanize(other=b) for relative to b not now
- ⚠ Arrow objects are not datetime — arrow.Arrow is not a subclass of datetime.datetime; passing arrow object to functions expecting datetime: use .datetime property; a.datetime returns timezone-aware datetime; a.date() returns date; a.time() returns time; don't assume duck typing with datetime
- ⚠ Timezone names vs offsets — arrow.now('US/Eastern') uses IANA timezone database; arrow.now('+05:30') uses offset; IANA timezones handle DST; offsets are fixed; agent code for recurring scheduled tasks: use IANA timezone name not offset to handle daylight saving transitions correctly
- ⚠ range() generates Arrow objects not dates — for day in arrow.Arrow.range('day', start, end) yields Arrow objects; to get date strings: day.format('YYYY-MM-DD'); to get Python dates: day.date(); last day in range is included (inclusive both ends); agent code: end = start.shift(days=6) for 7-day range
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for arrow.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-06.