Skip to content

Commit a549b7d

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

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

jsManual/asciidoc/session-api.adoc

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

55+
[[js-driver-async-temporal-types]]
56+
=== Using Temporal Types
57+
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
58+
not have in it standard version, the following temporal types are part of this.
59+
60+
[[js-driver-async-temporal-types-datetime]]
61+
==== DateTime
62+
Represents an instant capturing the date, the time and the timezone identifier.
63+
64+
[source, javascript]
65+
----
66+
include::{javascript-examples}/examples.test.js[tags=temporal-types-datetime]
67+
----
68+
69+
[[js-driver-async-temporal-types-date]]
70+
==== Date
71+
Represents an instant capturing the date, but not the time, nor the timezone.
72+
73+
[source, javascript]
74+
----
75+
include::{javascript-examples}/examples.test.js[tags=temporal-types-date]
76+
----
77+
78+
[[js-driver-async-temporal-types-time]]
79+
==== Time
80+
Represents an instant capturing the time of day, and the timezone offset in seconds, but not the date.
81+
82+
[source, javascript]
83+
----
84+
include::{javascript-examples}/examples.test.js[tags=temporal-types-time]
85+
----
86+
87+
[[js-driver-async-temporal-types-localdatetime]]
88+
==== LocalDateTime
89+
Represents an instant capturing the date and the time, but not the timezone.
90+
91+
[source, javascript]
92+
----
93+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localdatetime]
94+
----
95+
96+
[[js-driver-async-temporal-types-localtime]]
97+
==== LocalTime
98+
Represents an instant capturing the time of day, but not the date, nor the timezone.
99+
100+
[source, javascript]
101+
----
102+
include::{javascript-examples}/examples.test.js[tags=temporal-types-localtime]
103+
----
104+
105+
[[js-driver-async-temporal-types-duration]]
106+
==== Duration
107+
Represents an ISO 8601 duration. Contains both date-based values (years, months, days) and time-based values (seconds, nanoseconds).
108+
109+
[source, javascript]
110+
----
111+
include::{javascript-examples}/examples.test.js[tags=temporal-types-duration]
112+
----
55113

56114
[[js-driver-rx-sessions]]
57115
== Reactive Sessions

0 commit comments

Comments
 (0)