Skip to content

Commit c237fca

Browse files
committed
javascript: Providing documentation and examples for Temporal types
Adding section with usage examples of the temporal types.
1 parent afd3bfb commit c237fca

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

jsManual/asciidoc/cypher-workflow.adoc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,64 @@ include::{common-content}/cypher-workflow.adoc[tag=type-mapping]
127127
======
128128

129129

130+
[[js-driver-temporal-types]]
131+
=== Temporal Types
132+
This section list some basic usage of the temporal types provided by the driver.
133+
134+
[[js-driver-temporal-types-datetime]]
135+
==== DateTime
136+
Represents an instant capturing the date, the time and the timezone identifier.
137+
138+
[source, javascript]
139+
----
140+
include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime]
141+
----
142+
143+
[[js-driver-temporal-types-date]]
144+
==== Date
145+
Represents an instant capturing the date, but not the time, nor the timezone.
146+
147+
[source, javascript]
148+
----
149+
include::{javascript-examples}/examples.test.js[tags=temporal-types-date]
150+
----
151+
152+
[[js-driver-temporal-types-time]]
153+
==== Time
154+
Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date.
155+
156+
[source, javascript]
157+
----
158+
include::{javascript-examples}/examples.test.js[tags=temporal-types-time]
159+
----
160+
161+
[[js-driver-temporal-types-localdatetime]]
162+
==== LocalDateTime
163+
Represents an instant capturing the date and the time, but not the timezone.
164+
165+
[source, javascript]
166+
----
167+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetime]
168+
----
169+
170+
[[js-driver-temporal-types-localtime]]
171+
==== LocalTime
172+
Represents an instant capturing the time of day, but not the date, nor the timezone.
173+
174+
[source, javascript]
175+
----
176+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime]
177+
----
178+
179+
[[js-driver-temporal-types-duration]]
180+
==== Duration
181+
Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds).
182+
183+
[source, javascript]
184+
----
185+
include::{javascript-examples}/examples.test.js[tags=temporal-types-duration]
186+
----
187+
130188
[[js-driver-exceptions-errors]]
131189
== Exceptions and error handling
132190

jsManual/asciidoc/session-api.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ include::{common-content}/session-api.adoc[tag=async-result-consume]
5252
include::{javascript-examples}/examples.test.js[tags=async-result-consume]
5353
----
5454

55-
5655
[[js-driver-rx-sessions]]
5756
== Reactive Sessions
5857

0 commit comments

Comments
 (0)