javascript-time-ago
Version:
Localized relative date/time formatting
51 lines (33 loc) • 1.03 kB
Markdown
These are the additional localized time interval labels.
## `now`
`"now"` labels. Shorter is better.
* `"now"` (current) — Right now.
* `"just now"` (past) — A moment ago.
* `"in a moment"` (future) — In a moment.
## `mini`
(previoiusly called `"tiny"`)
The shortest ones available, without the `" ago"`/`"in "` part.
* `1s`
* `2m`
* `3d`
* `4yr`
* …
These're the ones used in `"mini"` and `"twitter"` styles.
## `long-time`
(maybe these should be removed?)
These're the `long` labels without the `" ago"`/`"in "` part.
* `1 second`
* `2 minutes`
* `3 days`
* `4 years`
* …
These labels can be used in scenarios like a progress bar displaying the time left: `"2 hours"`, `"15 minutes"`.
## `short-time`
(maybe these should be removed?)
These're the `short` labels without the `" ago"`/`"in "` part.
* `1 sec.`
* `2 min.`
* `3 days`
* `4 yr.`
* …
These labels can be used in scenarios like a progress bar displaying the time left: `"2 hr."`, `"15 min."`.