#date-parser #date-time #td #expression #machine-readable #cli-parser #translates #nlp #json-output #utc

bin+lib tardis-cli

TARDIS - Translates natural language dates into machine-readable formats

2 unstable releases

Uses new Rust 2024

new 0.2.0 Apr 13, 2026
0.1.0 Jun 25, 2025

#142 in Date and time

MIT license

270KB
7K SLoC

TARDIS CLI (td)

Crates.io Docs.rs CI codecov MSRV

TARDIS logo

TARDIS -- Time And Relative Date Input Simplifier. Like the Doctor's ship in Doctor Who, it translates human-friendly time expressions into precise datetimes right from your terminal.

$ td "next friday at 3pm"
2025-01-17T15:00:00

$ td "2 days ago" -f "%Y-%m-%d"
2025-01-13

Install

cargo install tardis-cli --locked

From source:

git clone https://github.com/hvpaiva/tardis-cli.git
cd tardis-cli && cargo install --path . --locked

Shell completions:

td completions bash > ~/.local/share/bash-completion/completions/td
td completions zsh  > "${fpath[1]}/_td"
td completions fish > ~/.config/fish/completions/td.fish

Quick Start

$ td "tomorrow 15:00"
2025-01-16T15:00:00

$ td "in 2 hours" -f "%H:%M"
12:30

$ td @1735689600 -f "%Y-%m-%d"
2025-01-01

$ td "now + 3h"
2025-01-15T13:30:00

$ td eod
2025-01-15T23:59:59

$ td "today" --json --now "2025-01-15T00:00:00Z"
{"epoch":1736899200,"format":"%Y-%m-%dT%H:%M:%S","input":"today","output":"2025-01-15T00:00:00","timezone":"UTC"}

Features

Feature Example Documentation
Natural language td "next friday at 3pm" Expression Reference
Date arithmetic td "tomorrow + 3 hours" Expression Reference
Format control td "now" -f "%Y-%m-%d" Format Specifiers
Timezone conversion td tz "3pm" --to UTC Subcommands
Date diff td diff "jan 1" "mar 15" Subcommands
JSON output td "now" --json Subcommands
Configuration td config show Configuration
Boundaries td eod, td sow Expression Reference
Epoch input td @1735689600 Expression Reference
Batch mode cat dates.txt | td Expression Reference

Subcommands

Command Description
td diff Compute the duration between two dates
td convert Re-format a date into a target format
td tz Convert a datetime between timezones
td info Display calendar metadata (week, quarter, Julian day)
td range Expand a period expression into start/end datetimes
td config Inspect and manage the configuration file
td completions Generate shell completion scripts

See the Subcommand Reference for full usage and examples.

Documentation

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT


Trivia

The name TARDIS pays homage to the iconic, bigger-on-the-inside time machine from Doctor Who. This CLI helps you navigate time too -- minus the wibbly-wobbly stuff.

Dependencies

~6–9.5MB
~156K SLoC