Agocomponent
Ago(props: AgoProps): ReactElement
| Param | Type | |
|---|---|---|
props | AgoProps | Props for Ago — identical to WhenProps. required |
| Return | |
|---|---|
ReactElement | Rendered <time> element showing the elapsed time. |
| Throws | |
|---|---|
RequiredError | If target (or current) cannot be coerced to a valid date. |
Elapsed time — shows an unsigned string like 6d or 3w for a past date wrapped in a <time> element carrying the machine-readable date.
Examples
<Ago target="2020-01-01" />