Date Parsing

Natural language date input reference for all cal commands.

Overview

Every flag that accepts a date (--from, --to, --start, --end, --repeat-until) supports natural language input. The built-in parser handles 20+ patterns without any external dependencies.

All relative expressions are evaluated at the moment the command runs.

Supported Patterns

Relative Days

InputResolves to
todayStart of today
tomorrowStart of tomorrow
yesterdayStart of yesterday

Weekdays

InputResolves to
next mondayNext occurrence of that weekday
next fridayNext occurrence of that weekday
fridayNext Friday (same as next friday)

Relative Periods

InputResolves to
next weekMonday of next week
next month1st of next month
this weekEnd of this week (Sunday 11:59 PM)

Relative Time

InputResolves to
in 3 hours3 hours from now
in 30 minutes30 minutes from now
in 5 days5 days from now
in 2 weeks14 days from now
in 1 month1 month from now

Past Relative

InputResolves to
2 hours ago2 hours before now
5 days ago5 days before now
1 month ago1 month before now

Time of Day

InputResolves to
3pmToday at 3:00 PM
15:00Today at 3:00 PM
3:30pmToday at 3:30 PM
9amToday at 9:00 AM

Weekday + Time

InputResolves to
friday 2pmNext Friday at 2:00 PM
monday 9amNext Monday at 9:00 AM

Month + Day

InputResolves to
mar 15March 15 of this year
march 15March 15 of this year
dec 25December 25 of this year

ISO 8601

InputResolves to
2026-03-15March 15, 2026
2026-03-15 14:00March 15, 2026 at 2 PM

Shorthand Keywords

InputResolves to
eodToday at 5:00 PM
eowFriday at 5:00 PM

End-of-Day Behavior

When a date is used with the --to flag and resolves to midnight (00:00:00), cal automatically bumps it to 23:59:59 of that day. This ensures that --to "feb 12" includes all events on February 12, not just those before midnight.

This applies to list, search, export, and the interactive event picker.

Usage Examples

# Events from today through end of next Friday
cal list -f today -t "next friday"

# Events in the past month
cal list -f "1 month ago" -t today

# Create event starting in 2 hours
cal add "Quick call" -s "in 2 hours" -e "in 3 hours"

# Search events around a specific date
cal search "review" -f "mar 1" -t "mar 31"

# Export this week's events
cal export -f today -t "this week" --format json