rtime
rtime
A simple command-line tool written in Crystal that converts Unix timestamps to human-readable relative time strings.
Description
rtime takes one or more Unix timestamps and outputs how long ago they occurred in a human-friendly format (e.g., "5 minutes ago", "2 days ago", "3 years ago").
Building
make build
Installing
Symlinks the built binary into ~/.local/bin, so rebuilds are picked up automatically:
make install
Override the location with PREFIX or BINDIR (e.g. make install PREFIX=/usr/local). Remove the link with make uninstall.
Testing
make test
Usage
./rtime <timestamp>
Examples
# Single timestamp
./rtime 1729000000
# Multiple timestamps
./rtime 1729000000 1728000000 1727000000
Output Format
The tool displays relative time in the most appropriate unit:
- Seconds (0-59 seconds ago)
- Minutes (1-59 minutes ago)
- Hours (1-23 hours ago)
- Days (1-6 days ago)
- Weeks (1-4 weeks ago)
- Months (1-11 months ago)
- Years (12+ months ago)
Future timestamps are displayed as "in the future".
Repository
rtime
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- about 3 hours ago
- October 16, 2025
License
Links
Synced at
Thu, 03 Sep 2026 02:49:17 GMT
Languages