tcalc_core

Crates.iotcalc_core
lib.rstcalc_core
version0.1.1
created_at2025-12-08 08:55:43.75998+00
updated_at2025-12-08 10:09:27.854118+00
descriptionCore library for tcalc-cli crate.
homepage
repositoryhttps://github.com/domenicocinque/tcalc
max_upload_size
id1973010
size38,147
Domenico (domenicocinque)

documentation

README

tcalc

A CLI for time arithmetic. Inspired by when. Try it online.

Examples:

  • 2023/12/25 - 7d → subtracts 7 days from December 25, 2023
  • 2am + 30m → adds 30 minutes to 2:00 AM
  • today - 2025/12/25 -> days until December 25, 2025

Usage

Run without installing: cargo run -p cli -- "2am + 30m"

Syntax

  • Dates use YYYY/MM/DD and can include time as YYYY/MM/DD HH:MM.
  • Times accept 24-hour HH:MM or H[am|pm] forms (2pm → 14:00).
  • Keywords: today, tomorrow, yesterday, now.
  • Durations combine a number with a unit: y, year, month, day|d, hour|h, minute|m, second|s.
  • Combine values with + and -, chaining operations left-to-right (today - 2h + 30m).
Commit count: 0

cargo fmt