ago
Time ago in words in Nim
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-09-01 07:18 |
Tags
Authors
- Daehee
Installation
nimble install ago
choosenim install ago
git clone https://github.com/daehee/ago
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| ago | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.4.2 | No |
Source
| Repository | https://github.com/daehee/ago |
|---|---|
| Homepage | https://github.com/daehee/ago |
| Registry Source | nimble_official |
README
ago
A "time ago in words" helper for Nim, ported from Rails time_ago_in_words.
Usage
block:
let fromTime = now() - 45.minutes
echo fromTime.ago # "about 1 hour ago"
block:
let fromTime = now() - (31.days)
echo fromTime.ago # "about 1 month ago"
block:
let fromTime = now() - (2.years + 3.months)
echo fromTime.ago # "over 2 years ago"