---
id: "relative_time"
kind: "datatype"
status: "draft"
is_pii: false
name: "Time relative to now (2 days ago)"
categories: ["datetime"]
langs: ["en"]
quality: 70
url: "https://registry.apicrafter.io/datatype/relative_time"
---

# Time relative to now (2 days ago) (`relative_time`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

A moment in the past given as the time elapsed until the page was shown: 2 days ago, an hour ago, 3 years 23 weeks ago, 1h 35min ago. Forums, comment lists, file listings and activity feeds write the time of the last post or update this way, and the value is only meaningful together with the date of the page (the crawl date for archived pages).

- Personal data (PII): no
- Categories: Date and time (datetime)
- Countries: global
- Languages: English (en)
- Classification: categorical

## Examples

- `2 days ago`
- `an hour ago`
- `2 years 38 weeks ago` — Drupal
- `1h 35min ago`
- `2 days` (invalid example) — a duration

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `relativetimevalue` (data, `common/dateandtime.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- ru: Время относительно текущего момента (2 дня назад)

## Sources

- doc: <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat>

## Quality

Score 70/100. Missing: regexp, mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/relative_time.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/datetime/relative_time.yaml>
