WHENWORDS
// A relative time formatting library, with no code.
whenwords
A relative time formatting library, with no code.
13EmergingUnknown
What it does
Today I'm releasing , a relative time formatting library that contains no code. delivers the following functions: - timeago — Converts a timestamp to a relative time string like "3 hours ago" or "in 2 days" based on a reference time. - duration — Formats a number of seconds as a human-readable duration like "2 hours, 30 minutes" or "2h 30m" in compact mode. - parseduration — The inverse of
Getting Started
git
git clone https://github.com/dbreunig/whenwords