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

@ -53,10 +53,10 @@ keys[]
- `instance_languages` = Most-used languages from a remote server
start_at
: String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
: String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
end_at
: String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
: String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
limit
: Integer. The maximum number of results to return for sources, servers, languages, tag or instance dimensions.

View file

@ -58,10 +58,10 @@ keys[]
- `instance_followers` = Total local accounts followed by accounts from a remote domain within the time period
start_at
: {{<required>}} String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
end_at
: {{<required>}} String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
tag_accounts[id]
: String. When `tag_accounts` is one of the requested keys, you must provide a tag ID to obtain the measure of how many accounts used that hashtag in at least one status within the given time period.

View file

@ -41,10 +41,10 @@ Authorization
##### Form data parameters
start_at
: {{<required>}} String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
end_at
: {{<required>}} String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
frequency
: {{<required>}} String (Enumerable oneOf). Specify whether to use `day` or `month` buckets. If any other value is provided, defaults to `day`.