From b50cb2937defa46ca5549e663621cfa458c36835 Mon Sep 17 00:00:00 2001 From: roll Date: Fri, 26 Jan 2024 15:11:25 +0000 Subject: [PATCH 1/6] Updated date/time definitions --- content/docs/specifications/table-schema.md | 40 +++++++++------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index bb6ba89f..96f16a9a 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -248,44 +248,36 @@ The field contains data that is a valid JSON format arrays. `format`: no options (other than the default). -#### date +#### datetime -A date without a time. +The field contains a date with a time. `format`: -- **default**: An ISO8601 format string. - - date: This `MUST` be in ISO8601 format YYYY-MM-DD - - datetime: a date-time. This `MUST` be in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time - - time: a time without a date -- **any**: Any parsable representation of the type. The implementing - library can attempt to parse the datetime via a range of strategies. - An example is `dateutil.parser.parse` from the `python-dateutils` - library. -- **\**: date/time values in this field can be parsed according to - ``. `` `MUST` follow the syntax of [standard Python / C - strptime][strptime]. (That is, values in the this field `SHOULD` be parsable - by Python / C standard `strptime` using ``). Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` +- **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.000-05:00` +- **\**: values in this field can be parsed according to + ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. (That is, values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``). Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` +- **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. -#### time +#### date -A time without a date. +The field contains a date without a time. `format`: -- **default**: An ISO8601 time string e.g. `hh:mm:ss` -- **any**: as for `date` -- **\**: as for `date` +- **default**: The lexical representation `MUST` be `yyyy-mm-dd` +- **\**: The same as for `datetime` +- **any**: The same as for `datetime` -#### datetime +#### time -A date with a time. +The field contains a time without a date. `format`: -- **default**: An ISO8601 format string e.g. `YYYY-MM-DDThh:mm:ssZ` in UTC time -- **any**: as for `date` -- **\**: as for `date` +- **default**: The lexical representation `MUST` be `hh:mm:ss` +- **\**: The same as for `datetime` +- **any**: The same as for `datetime` #### year From 0b3bd204cc059c331db1acfa7a4de09dd01f713e Mon Sep 17 00:00:00 2001 From: roll Date: Fri, 26 Jan 2024 15:15:48 +0000 Subject: [PATCH 2/6] Added examples --- content/docs/specifications/table-schema.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index 96f16a9a..c1056c3d 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -265,7 +265,7 @@ The field contains a date without a time. `format`: -- **default**: The lexical representation `MUST` be `yyyy-mm-dd` +- **default**: The lexical representation `MUST` be `yyyy-mm-dd` e.g. `2024-01-26` - **\**: The same as for `datetime` - **any**: The same as for `datetime` @@ -275,7 +275,7 @@ The field contains a time without a date. `format`: -- **default**: The lexical representation `MUST` be `hh:mm:ss` +- **default**: The lexical representation `MUST` be `hh:mm:ss` e.g. `15:00:00` - **\**: The same as for `datetime` - **any**: The same as for `datetime` From 5de0fd738bbe069743df5da03a95b461942490f5 Mon Sep 17 00:00:00 2001 From: roll Date: Fri, 26 Jan 2024 15:19:57 +0000 Subject: [PATCH 3/6] Improved formatting --- content/docs/specifications/table-schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index c1056c3d..5b100ecf 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -256,7 +256,7 @@ The field contains a date with a time. - **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.000-05:00` - **\**: values in this field can be parsed according to - ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. (That is, values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``). Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` + ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. Values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``. Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` - **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. #### date From 79d74f425c39633da6105a9ccee7972fcdb1f795 Mon Sep 17 00:00:00 2001 From: roll Date: Mon, 19 Feb 2024 14:04:03 +0000 Subject: [PATCH 4/6] Update content/docs/specifications/table-schema.md Co-authored-by: Peter Desmet --- content/docs/specifications/table-schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index 5b100ecf..f3722f97 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -254,7 +254,7 @@ The field contains a date with a time. `format`: -- **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.000-05:00` +- **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.300-05:00`. - **\**: values in this field can be parsed according to ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. Values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``. Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` - **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. From a490ccace19b8a40f00fcc14245800fa0d4aed46 Mon Sep 17 00:00:00 2001 From: roll Date: Mon, 19 Feb 2024 14:07:41 +0000 Subject: [PATCH 5/6] Updated datetime pattern example --- content/docs/specifications/table-schema.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index f3722f97..72184b7f 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -255,8 +255,7 @@ The field contains a date with a time. `format`: - **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.300-05:00`. -- **\**: values in this field can be parsed according to - ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. Values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``. Example for `"format": "%d/%m/%y"` which would correspond to dates like: `30/11/14` +- **\**: values in this field can be parsed according to ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. Values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``. Example for `"format": ""%d/%m/%Y %H:%M:%S"` which would correspond to a date with time like: `12/11/2018 09:15:32`. - **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. #### date From f2e3203dea098a729eb16bcdfebd7eb9352901e3 Mon Sep 17 00:00:00 2001 From: roll Date: Tue, 20 Feb 2024 09:08:05 +0000 Subject: [PATCH 6/6] Added `any` format note --- content/docs/specifications/table-schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/specifications/table-schema.md b/content/docs/specifications/table-schema.md index 72184b7f..aefe8f98 100644 --- a/content/docs/specifications/table-schema.md +++ b/content/docs/specifications/table-schema.md @@ -256,7 +256,7 @@ The field contains a date with a time. - **default**: The lexical representation `MUST` be in a form defined by [XML Schema](https://www.w3.org/TR/xmlschema-2/#dateTime) containing required date and time parts, followed by optional milliseconds and timezone parts, for example, `2024-01-26T15:00:00` or `2024-01-26T15:00:00.300-05:00`. - **\**: values in this field can be parsed according to ``. `` `MUST` follow the syntax of [standard Python / C strptime][strptime]. Values in the this field `SHOULD` be parsable by Python / C standard `strptime` using ``. Example for `"format": ""%d/%m/%Y %H:%M:%S"` which would correspond to a date with time like: `12/11/2018 09:15:32`. -- **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. +- **any**: Any parsable representation of the value. The implementing library can attempt to parse the datetime via a range of strategies. An example is `dateutil.parser.parse` from the `python-dateutils` library. It is `NOT RECOMMENDED` to use `any` format as it might cause interoperability issues. #### date