A fast, terminal-native date calculator and tracker written in Rust using ratatui and crossterm. It handles everything from simple “days until” checks to storing your favorite dates and calculation history — all in glorious ANSI color.
-
Calculator tab — Compute:
u→ Days until a target dates→ Days since a dateb→ Days between two datesa→ Add or subtract a number of days from a given date
Save any result to your history with
h. -
Dates tab — Manage stored dates and history:
n→ Add a new favorite dated→ Delete selected entryc→ Clear all entries (type “yes” to confirm)f/h/a→ Filter by favorites, history, or all- Arrow keys navigate through the list
-
Help tab — Built-in quick reference (
?). -
Persistent storage — All data is saved to a local
entries.jsonin your working directory. -
Offline and portable — No network dependencies; runs anywhere with a UTF-8 terminal.
Install:
cargo install days-tui
days-tuiOR
Make sure you have a recent Rust toolchain:
sudo dnf install rust cargo # Fedora exampleThen build and run:
git clone https://github.com/fibnas/days-tui.git
cd days-tui
cargo run --release| Key | Context | Action |
|---|---|---|
Tab / Shift+Tab |
Global | Switch tabs |
q |
Global | Quit |
? |
Global | Open Help |
u / b / s / a |
Calculator | Until / Between / Since / Add-Sub |
h |
Calculator | Save result to History |
n |
Dates | Add new favorite |
d |
Dates | Delete selected |
c |
Dates | Clear all entries |
f |
Dates | Show favorites only |
h |
Dates | Show history only |
a |
Dates | Show all |
↑ / ↓ |
Dates | Move selection |
Esc |
Input mode | Cancel current input |
Enter |
Input mode | Submit |
entries.json ← Saved history & favorites
src/main.rs ← Core TUI logic
Cargo.toml ← Dependencies & metadata
- Dates use ISO format:
YYYY-MM-DD - Add/Sub accepts positive or negative integers
- Each saved entry is tagged with:
- username (
whoami) - timestamp (RFC3339)
- type (
FavoriteorHistory)
- username (
┌──────────────────────────────┐
│ days-tui (ANSI) │
├──────────────────────────────┤
│ [Calculator] [Dates] [Help] │
│ │
│ Days until 2025-12-25: 67 │
│ │
│ h: Save • q: Quit • ?: Help │
└──────────────────────────────┘
ratatui— terminal UI frameworkcrossterm— cross-platform terminal controlserde+serde_json— JSON serializationchrono— date handlingthiserror— friendly error typeswhoami— grabs current user
MIT License © 2025 fibnas