Skip to content

Commit bdc0f8a

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

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

jsManual/asciidoc/cypher-workflow.adoc

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

129129

130+
[[js-driver-temporal-types]]
131+
=== Temporal Types
132+
The communication between the driver and the Neo4j server is typesafe. This implies in the need for specialized objects for represent types which Javascript does
133+
not have in it standard version, the following temporal types are part of this.
134+
135+
[[js-driver-temporal-types-datetime]]
136+
==== DateTime
137+
Represents an instant capturing the date, the time and the timezone identifier.
138+
139+
[source, javascript]
140+
----
141+
include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime]
142+
----
143+
144+
[[js-driver-temporal-types-date]]
145+
==== Date
146+
Represents an instant capturing the date, but not the time, nor the timezone.
147+
148+
[source, javascript]
149+
----
150+
include::{javascript-examples}/examples.test.js[tags=temporal-types-date]
151+
----
152+
153+
[[js-driver-temporal-types-time]]
154+
==== Time
155+
Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date.
156+
157+
[source, javascript]
158+
----
159+
include::{javascript-examples}/examples.test.js[tags=temporal-types-time]
160+
----
161+
162+
[[js-driver-temporal-types-localdatetime]]
163+
==== LocalDateTime
164+
Represents an instant capturing the date and the time, but not the timezone.
165+
166+
[source, javascript]
167+
----
168+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetime]
169+
----
170+
171+
[[js-driver-temporal-types-localtime]]
172+
==== LocalTime
173+
Represents an instant capturing the time of day, but not the date, nor the timezone.
174+
175+
[source, javascript]
176+
----
177+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime]
178+
----
179+
180+
[[js-driver-temporal-types-duration]]
181+
==== Duration
182+
Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds).
183+
184+
[source, javascript]
185+
----
186+
include::{javascript-examples}/examples.test.js[tags=temporal-types-duration]
187+
----
188+
130189
[[js-driver-exceptions-errors]]
131190
== Exceptions and error handling
132191

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)