From 09f168afc4403fbefe32fc0fd2643e55093f20e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:37:30 +0200 Subject: [PATCH 1/2] add timestamp --- modules/ROOT/pages/functions/index.adoc | 4 ++++ modules/ROOT/pages/functions/scalar.adoc | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/functions/index.adoc b/modules/ROOT/pages/functions/index.adoc index 1e80dd74a..30cc51484 100644 --- a/modules/ROOT/pages/functions/index.adoc +++ b/modules/ROOT/pages/functions/index.adoc @@ -445,6 +445,10 @@ Replaced by xref:functions/scalar.adoc#functions-elementid[`elementId()`]. | `startNode(input :: RELATIONSHIP) :: NODE` | Returns the start `NODE` of a `RELATIONSHIP`. +1.1+| xref::functions/scalar.adoc#functions-timestamp[`timestamp()`] +| `timestamp() :: INTEGER` +| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. + 1.1+| xref::functions/scalar.adoc#functions-toboolean[`toBoolean()`] | `toBoolean(input :: BOOLEAN \| STRING \| INTEGER) :: BOOLEAN` | Converts a `BOOLEAN`, `STRING`, or an `INTEGER` value to a `BOOLEAN` value. diff --git a/modules/ROOT/pages/functions/scalar.adoc b/modules/ROOT/pages/functions/scalar.adoc index 54261bd66..417809b8b 100644 --- a/modules/ROOT/pages/functions/scalar.adoc +++ b/modules/ROOT/pages/functions/scalar.adoc @@ -855,14 +855,12 @@ RETURN startNode(r) .Details |=== | *Syntax* 3+| `timestamp()` -| *Description* 3+| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC +| *Description* 3+| Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. | *Returns* 3+| `INTEGER` |=== [NOTE] -==== -It is the equivalent of `datetime().epochMillis`. -==== +xref:functions/temporal/index.adoc#functions-datetime-fromepochmillis[`datetime.epochMillis()`] is a functional equivalent to `timestamp()`. .Considerations |=== From f850fcae29ad893d6606de6c4b50db44ca8f6ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Mon, 28 Apr 2025 09:57:32 +0200 Subject: [PATCH 2/2] wrong function name and small formatting issue --- modules/ROOT/pages/functions/index.adoc | 8 ++++---- modules/ROOT/pages/functions/scalar.adoc | 2 +- modules/ROOT/pages/functions/temporal/index.adoc | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ROOT/pages/functions/index.adoc b/modules/ROOT/pages/functions/index.adoc index 30cc51484..50812bff8 100644 --- a/modules/ROOT/pages/functions/index.adoc +++ b/modules/ROOT/pages/functions/index.adoc @@ -652,12 +652,12 @@ Values of the xref::values-and-types/temporal.adoc[temporal types] -- `DATE`, `Z | `datetime(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: ZONED DATETIME` | Creates a `ZONED DATETIME` instant. -1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromepoch()`] -| `datetime.fromepoch(seconds :: INTEGER \| FLOAT, nanoseconds :: INTEGER \| FLOAT) :: ZONED DATETIME` +1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromEpoch()`] +| `datetime.fromEpoch(seconds :: INTEGER \| FLOAT, nanoseconds :: INTEGER \| FLOAT) :: ZONED DATETIME` | Creates a `ZONED DATETIME` given the seconds and nanoseconds since the start of the epoch. -1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromepochmillis()`] -| `datetime.fromepochmillis(milliseconds :: INTEGER \| FLOAT) :: ZONED DATETIME` +1.1+| xref::functions/temporal/index.adoc#functions-datetime-timestamp[`datetime.fromEpochMillis()`] +| `datetime.fromEpochMillis(milliseconds :: INTEGER \| FLOAT) :: ZONED DATETIME` | Creates a `ZONED DATETIME` given the milliseconds since the start of the epoch. 1.1+| xref::functions/temporal/index.adoc#functions-datetime-realtime[`datetime.realtime()`] diff --git a/modules/ROOT/pages/functions/scalar.adoc b/modules/ROOT/pages/functions/scalar.adoc index 417809b8b..79b6663ec 100644 --- a/modules/ROOT/pages/functions/scalar.adoc +++ b/modules/ROOT/pages/functions/scalar.adoc @@ -860,7 +860,7 @@ RETURN startNode(r) |=== [NOTE] -xref:functions/temporal/index.adoc#functions-datetime-fromepochmillis[`datetime.epochMillis()`] is a functional equivalent to `timestamp()`. +xref:functions/temporal/index.adoc#functions-datetime-fromepochmillis[`datetime.fromEpochMillis()`] is a functional equivalent to `timestamp()`. .Considerations |=== diff --git a/modules/ROOT/pages/functions/temporal/index.adoc b/modules/ROOT/pages/functions/temporal/index.adoc index 6a4e90508..5ca5b37b7 100644 --- a/modules/ROOT/pages/functions/temporal/index.adoc +++ b/modules/ROOT/pages/functions/temporal/index.adoc @@ -1318,7 +1318,7 @@ RETURN datetime({epochMillis: 424797300000}) AS theDate .Details |=== -| *Syntax* 3+| `datetime.fromepoch(seconds, nanoseconds)` +| *Syntax* 3+| `datetime.fromEpoch(seconds, nanoseconds)` | *Description* 3+| Creates a `ZONED DATETIME` given the seconds and nanoseconds since the start of the epoch. .3+| *Arguments* | *Name* | *Type* | *Description* | `seconds` | `INTEGER \| FLOAT` | The number of seconds from the UNIX epoch in the UTC timezone. @@ -1354,7 +1354,7 @@ RETURN dateTimeFromEpoch .Details |=== -| *Syntax* 3+| `datetime.fromepochmillis(milliseconds)` +| *Syntax* 3+| `datetime.fromEpochMillis(milliseconds)` | *Description* 3+| Creates a `ZONED DATETIME` given the milliseconds since the start of the epoch. .2+| *Arguments* | *Name* | *Type* | *Description* | `milliseconds` | `INTEGER \| FLOAT` | The number of milliseconds from the UNIX epoch in the UTC timezone.