feat: Document datetime and date formats (#1565)

Add a new document that precisely describes the string representation of
datetime and date types.

The previous description of them as "ISO 8601 Datetime" was very
imprecise, as ISO 8601 describes many different ways of representing a
datetime and date.

Specify the datetime format precisely as the ISO 8601 profile described
in RFC 3339, and the date format precisely as the "Complete date" format
from the W3C note on date and time formats.

Adjust all the references to ISO 8601 datetimes or dates to link back
to the definition.

Fixes #1420
This commit is contained in:
Nik Clayton 2024-11-27 16:08:51 +01:00 committed by GitHub
parent 09dc6a85cd
commit 49868155b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 117 additions and 54 deletions

View file

@ -239,7 +239,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the account was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
0.1.0 - added\
3.4.0 - now resolves to midnight instead of an exact time
@ -247,7 +247,7 @@ aliases: [
### `last_status_at` {#last_status_at}
**Description:** When the most recent status was posted.\
**Type:** {{<nullable>}} String (ISO 8601 Date), or null if no statuses\
**Type:** {{<nullable>}} String ([Date](/api/datetime-format#date)), or null if no statuses\
**Version history:**\
3.0.0 - added\
3.1.0 - now returns date only, no time
@ -411,7 +411,7 @@ aliases: [
### `mute_expires_at` {#mute_expires_at}
**Description:** When a timed mute will expire, if applicable.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime), or null if the mute is indefinite\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)), or null if the mute is indefinite\
**Version history:**\
3.3.0 - added
@ -434,7 +434,7 @@ aliases: [
### `verified_at` {#verified_at}
**Description:** Timestamp of when the server verified a URL value for a rel="me" link.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime) if `value` is a verified URL. Otherwise, null.\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)) if `value` is a verified URL. Otherwise, null.\
**Version history:**\
2.6.0 - added

View file

@ -64,6 +64,6 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the event took place.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.3.0 - added

View file

@ -101,7 +101,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the account was first discovered.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
2.9.1 - added

View file

@ -85,7 +85,7 @@ Daily retention data for the week between 2022-09-08 and 2022-09-14, given that
### `period` {#period}
**Description:** The timestamp for the start of the period, at midnight.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added
@ -110,7 +110,7 @@ Daily retention data for the week between 2022-09-08 and 2022-09-14, given that
### `date` {#date}
**Description:** The timestamp for the start of the bucket, at midnight.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added

View file

@ -45,7 +45,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the domain was allowed to federate.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -59,7 +59,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the domain was blocked from federating.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -82,7 +82,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the email domain was disallowed from signups.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -37,7 +37,7 @@ aliases: [
### `used_at` {#used_at}
**Description:** The timestamp of when the IP address was last used for this account.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added

View file

@ -65,14 +65,14 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the IP block was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added
### `expires_at` {#expires_at}
**Description:** When the IP block will expire.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime)\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -63,7 +63,7 @@ aliases: [
#### `data[][date]` {#data-date}
**Description:** Midnight on the requested day in the time period.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added

View file

@ -82,7 +82,7 @@ aliases: [
### `action_taken_at` {#action_taken_at}
**Description:** When an action was taken, if this report is currently resolved.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime) or null\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)) or null\
**Version history:**\
2.9.1 - added
@ -113,14 +113,14 @@ aliases: [
### `created_at` {#created_at}
**Description:** The time the report was filed.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
2.9.1 - added
### `updated_at` {#updated_at}
**Description:** The time of last action on this report.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
2.9.1 - added

View file

@ -77,14 +77,14 @@ aliases: [
### `starts_at` {#starts_at}
**Description:** When the announcement will start.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime) or null\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)) or null\
**Version history:**\
3.1.0 - added
### `ends_at` {#ends_at}
**Description:** When the announcement will end.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime) or null\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)) or null\
**Version history:**\
3.1.0 - added
@ -105,14 +105,14 @@ aliases: [
### `published_at` {#created_at}
**Description:** When the announcement was published.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.1.0 - added
### `updated_at` {#updated_at}
**Description:** When the announcement was last updated.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.1.0 - added

View file

@ -78,7 +78,7 @@ This entity is currently unused.
### `created_at` {#created_at}
**Description:** A timestamp for when the message was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.2.0 - added

View file

@ -26,7 +26,7 @@ aliases: [
### `updated_at` {#updated_at}
**Description:** A timestamp of when the extended description was last updated.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -57,7 +57,7 @@ aliases: [
### `last_status_at` {#last_status_at}
**Description:** The timestamp of the last authored status containing this hashtag.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.0.0 - added

View file

@ -70,7 +70,7 @@ aliases: [
### `expires_at` {#expires_at}
**Description:** When the filter should no longer be applied.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime), or null if the filter does not expire\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)), or null if the filter does not expire\
**Version history:**\
4.0.0 - added

View file

@ -45,7 +45,7 @@ Identity proofs have been deprecated in 3.5.0 and newer. Previously, the only pr
### `updated_at` {#updated_at}
**Description:** When the identity proof was last updated.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
2.8.0 - added

View file

@ -40,7 +40,7 @@ aliases: [
### `updated_at` {#updated_at}
**Description:** The timestamp of when the marker was set.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
3.0.0 - added
## See also

View file

@ -56,7 +56,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** The timestamp of the notification.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
0.9.9 - added

View file

@ -21,14 +21,14 @@ aliases: [
### `created_at` {#created_at}
**Description:** The timestamp of the notification request, i.e. when the first filtered notification from that user was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.3.0 - added
### `updated_at` {#updated_at}
**Description:** The timestamp of when the notification request was last updated.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.3.0 - added

View file

@ -52,7 +52,7 @@ aliases: [
### `expires_at` {#expires_at}
**Description:** When the poll ends.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime), or null if the poll does not end\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)), or null if the poll does not end\
**Version history:**\
2.8.0 - added

View file

@ -53,6 +53,6 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the event took place.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.3.0 - added

View file

@ -72,7 +72,7 @@ aliases: [
### `action_taken_at` {#action_taken_at}
**Description:** When an action was taken against the report.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime) or null\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)) or null\
**Version history:**\
4.0.0 - added
@ -103,7 +103,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** When the report was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
4.0.0 - added

View file

@ -74,7 +74,7 @@ Returned from `GET /api/v1/scheduled_statuses`:
### `scheduled_at` {#scheduled_at}
**Description:** The timestamp for when the status will be posted.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
2.7.0 - added

View file

@ -119,7 +119,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** The date when this status was created.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
0.1.0 - added
@ -292,7 +292,7 @@ aliases: [
### `edited_at` {#edited_at}
**Description:** Timestamp of when the status was last edited.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime)\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added

View file

@ -71,7 +71,7 @@ aliases: [
### `created_at` {#created_at}
**Description:** The timestamp of when the revision was published.\
**Type:** String (ISO 8601 Datetime)\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added

View file

@ -62,7 +62,7 @@ aliases: [
### `expires_at` {#expires_at}
**Description:** When the filter should no longer be applied.\
**Type:** {{<nullable>}} String (ISO 8601 Datetime), or null if the filter does not expire\
**Type:** {{<nullable>}} String ([Datetime](/api/datetime-format#datetime)), or null if the filter does not expire\
**Version history:**\
2.4.3 - added