Skip to content

Commit 7db747a

Browse files
idorabanIgnition
authored andcommitted
Implemented date.parse and date.format procedures (#291)
Also added e2e tests for them.
1 parent c321f87 commit 7db747a

File tree

14 files changed

+172
-0
lines changed

14 files changed

+172
-0
lines changed

e2e/date_test/test_format1/input.cyp

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query: >
2+
CALL date.format(74976, "h", "%Y/%m/%d %H:%M:%S %Z", "Mexico/BajaNorte") YIELD formatted
3+
RETURN formatted
4+
5+
output:
6+
- formatted: "1978/07/21 17:00:00 PDT"

e2e/date_test/test_format2/input.cyp

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query: >
2+
CALL date.format(74976002900, "ms", "%Y/%m/%d %H:%M:%S %Z", "Australia/Broken_Hill") YIELD formatted
3+
RETURN formatted
4+
5+
output:
6+
- formatted: "1972/05/18 04:10:02 ACST"

e2e/date_test/test_format3/input.cyp

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query: >
2+
CALL date.format(7491, "d", "%Y/%m/%d %H:%M:%S %z", "Brazil/DeNoronha") YIELD formatted
3+
RETURN formatted
4+
5+
output:
6+
- formatted: "1990/07/05 22:00:00 -0200"

e2e/date_test/test_parse1/input.cyp

Whitespace-only changes.

e2e/date_test/test_parse1/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query: >
2+
CALL date.parse("2023/08/03 14:30:00", "h", "%Y/%m/%d %H:%M:%S", "Europe/Zagreb") YIELD parsed
3+
RETURN parsed
4+
5+
output:
6+
- parsed: 469740

e2e/date_test/test_parse2/input.cyp

Whitespace-only changes.

e2e/date_test/test_parse2/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
query: >
2+
CALL date.parse("21 June, 2018", "d", "%d %B, %Y", "US/Samoa") YIELD parsed
3+
RETURN parsed
4+
5+
output:
6+
- parsed: 17703

0 commit comments

Comments
 (0)