Registry / utility / andanhm-go-prettytime

andanhm-go-prettytime

JSON →
library1.1.0gogounverified

Formats time durations in a human-readable and understandable form.

go get github.com/andanhm/go-prettytime
INSTALL
IMPORT
SIG · ANDANHM-GO-PRETTYT
A
andanhm-go-prettytime
utilitygov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prettytime
github.com/andanhm/go-prettytime

Format a time duration as a human-readable string

import "github.com/andanhm/go-prettytime" func main() { s := prettytime.Format(time.Now().Add(-1 * time.Hour)) fmt.Println(s) // "1 hour ago" }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
andanhm-go-prettytime — go get andanhm-go-prettytime · libregistry