From 895df5e23f832e873c9b20956b325ca763f50008 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:38:44 -0500 Subject: [PATCH] docs: add date section to version 1 --- src/docs/version_001/dates/copy.md | 3 +++ src/docs/version_001/dates/example.md | 25 +++++++++++++++++++++++++ src/docs/version_001/docsStructure.ts | 6 ++++++ src/docs/version_002/dates/example.md | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/docs/version_001/dates/copy.md create mode 100644 src/docs/version_001/dates/example.md diff --git a/src/docs/version_001/dates/copy.md b/src/docs/version_001/dates/copy.md new file mode 100644 index 0000000..53cd3f7 --- /dev/null +++ b/src/docs/version_001/dates/copy.md @@ -0,0 +1,3 @@ +# Dates and Times {% #dates %} + +Onspring stores date/time information in UTC (Coordinated Universal Time), and the API expects to pass UTC data back and forth. The Onspring GUI converts the UTC value to the appropriate display value depending on your instance configuration and a user's profile settings. This means that when you are working with dates and times via the API, you need to be expecting to send and receive dates in UTC. diff --git a/src/docs/version_001/dates/example.md b/src/docs/version_001/dates/example.md new file mode 100644 index 0000000..455a3cf --- /dev/null +++ b/src/docs/version_001/dates/example.md @@ -0,0 +1,25 @@ +# Retrieving and sending date field values + +{% code heading="Date Field Value" defaultLanguage="json" %} + +```json +{ + "Type": 3, + "FieldId": 4800, + "Value": "2023-04-22T05:00:00Z" +} +``` + +{% /code %} + +**Note:** The format of the date field value will be impacted based on the [data format](#data-format) sent in the request to retrieve it. + +{% code heading="Value for Date Field" defaultLanguage="json" %} + +```json +{ + "4800": "2023-04-22T05:00:00Z" +} +``` + +{% /code %} diff --git a/src/docs/version_001/docsStructure.ts b/src/docs/version_001/docsStructure.ts index 9ade25d..e636dcb 100644 --- a/src/docs/version_001/docsStructure.ts +++ b/src/docs/version_001/docsStructure.ts @@ -22,5 +22,11 @@ export const versionOne: DocsStructure = { copy: 'copy.md', example: 'example.md', }, + { + title: 'Dates', + folder: 'dates', + copy: 'copy.md', + example: 'example.md', + }, ], }; diff --git a/src/docs/version_002/dates/example.md b/src/docs/version_002/dates/example.md index e673526..ec76d9d 100644 --- a/src/docs/version_002/dates/example.md +++ b/src/docs/version_002/dates/example.md @@ -12,7 +12,7 @@ {% /code %} -**Note:**: The format of the date field value will be impacted based on the [data format](#data-format) sent in the request to retrieve it. +**Note:** The format of the date field value will be impacted based on the [data format](#data-format) sent in the request to retrieve it. {% code heading="Value for Date Field" defaultLanguage="json" %}