From 009644294e84d2c4ac7aec212d25ad61095d8435 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Mon, 7 Jun 2021 14:27:45 +0200 Subject: [PATCH 1/4] javascript: Providing documentation and examples for Temporal types Adding section with usage examples of the temporal types. --- jsManual/asciidoc/cypher-workflow.adoc | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index 084f9ecb..e43891e6 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -127,6 +127,64 @@ include::{common-content}/cypher-workflow.adoc[tag=type-mapping] ====== +[[js-driver-temporal-types]] +=== Temporal Types +This section list some basic usage of the temporal types provided by the driver. + +[[js-driver-temporal-types-datetime]] +==== DateTime +Represents an instant capturing the date, the time and the timezone identifier. + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime] +---- + +[[js-driver-temporal-types-date]] +==== Date +Represents an instant capturing the date, but not the time, nor the timezone. + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-date] +---- + +[[js-driver-temporal-types-time]] +==== Time +Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date. + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-time] +---- + +[[js-driver-temporal-types-localdatetime]] +==== LocalDateTime +Represents an instant capturing the date and the time, but not the timezone. + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetime] +---- + +[[js-driver-temporal-types-localtime]] +==== LocalTime +Represents an instant capturing the time of day, but not the date, nor the timezone. + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime] +---- + +[[js-driver-temporal-types-duration]] +==== Duration +Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds). + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=temporal-types-duration] +---- + [[js-driver-exceptions-errors]] == Exceptions and error handling From c007e811c32d660a0aedd651e8e4177eaf908821 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Tue, 15 Jun 2021 13:00:49 +0100 Subject: [PATCH 2/4] Update jsManual/asciidoc/cypher-workflow.adoc --- jsManual/asciidoc/cypher-workflow.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index e43891e6..25e4b888 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -178,7 +178,8 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime] [[js-driver-temporal-types-duration]] ==== Duration -Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds). +Represents an ISO 8601 duration. +Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds). [source, javascript] ---- From 066ae76541c05d7e3777c93cb1ed97ebaf94318d Mon Sep 17 00:00:00 2001 From: David Oliver Date: Wed, 20 Oct 2021 15:41:00 +0100 Subject: [PATCH 3/4] editorial update --- jsManual/asciidoc/cypher-workflow.adoc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index 25e4b888..be2f4607 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -129,19 +129,24 @@ include::{common-content}/cypher-workflow.adoc[tag=type-mapping] [[js-driver-temporal-types]] === Temporal Types -This section list some basic usage of the temporal types provided by the driver. + +This section lists some basic usage of the temporal types provided by the JavaScript Driver. + [[js-driver-temporal-types-datetime]] ==== DateTime -Represents an instant capturing the date, the time and the timezone identifier. + +Represents an instant capturing the date, the time, and the timezone identifier. [source, javascript] ---- include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime] ---- + [[js-driver-temporal-types-date]] ==== Date + Represents an instant capturing the date, but not the time, nor the timezone. [source, javascript] @@ -149,8 +154,10 @@ Represents an instant capturing the date, but not the time, nor the timezone. include::{javascript-examples}/examples.test.js[tags=temporal-types-date] ---- + [[js-driver-temporal-types-time]] ==== Time + Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date. [source, javascript] @@ -158,8 +165,10 @@ Represents an instant capturing the time of day, and the timezone offset in seco include::{javascript-examples}/examples.test.js[tags=temporal-types-time] ---- + [[js-driver-temporal-types-localdatetime]] ==== LocalDateTime + Represents an instant capturing the date and the time, but not the timezone. [source, javascript] @@ -167,8 +176,10 @@ Represents an instant capturing the date and the time, but not the timezone. include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetime] ---- + [[js-driver-temporal-types-localtime]] ==== LocalTime + Represents an instant capturing the time of day, but not the date, nor the timezone. [source, javascript] @@ -176,9 +187,11 @@ Represents an instant capturing the time of day, but not the date, nor the timez include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime] ---- + [[js-driver-temporal-types-duration]] ==== Duration -Represents an ISO 8601 duration. + +Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds). [source, javascript] @@ -186,6 +199,7 @@ Contains both date-based values (years, months, days) and time-based values (sec include::{javascript-examples}/examples.test.js[tags=temporal-types-duration] ---- + [[js-driver-exceptions-errors]] == Exceptions and error handling From 1042617fbc0a9fd8c31ee9ddaa712ebb2c029f73 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Wed, 20 Oct 2021 15:44:52 +0100 Subject: [PATCH 4/4] use codeblocks in sub-headers --- jsManual/asciidoc/cypher-workflow.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index be2f4607..d2b2027b 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -134,7 +134,7 @@ This section lists some basic usage of the temporal types provided by the JavaSc [[js-driver-temporal-types-datetime]] -==== DateTime +==== `dateTime` Represents an instant capturing the date, the time, and the timezone identifier. @@ -145,7 +145,7 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime] [[js-driver-temporal-types-date]] -==== Date +==== `date` Represents an instant capturing the date, but not the time, nor the timezone. @@ -156,7 +156,7 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-date] [[js-driver-temporal-types-time]] -==== Time +==== `time` Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date. @@ -167,7 +167,7 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-time] [[js-driver-temporal-types-localdatetime]] -==== LocalDateTime +==== `localDateTime` Represents an instant capturing the date and the time, but not the timezone. @@ -178,7 +178,7 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetim [[js-driver-temporal-types-localtime]] -==== LocalTime +==== `localTime` Represents an instant capturing the time of day, but not the date, nor the timezone. @@ -189,7 +189,7 @@ include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime] [[js-driver-temporal-types-duration]] -==== Duration +==== `duration` Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds).