From f91d216de94ed44fbc4e485b8ee1e66e20e7270a Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Thu, 19 Dec 2024 13:13:43 +0100 Subject: [PATCH] not today --- hogvm/__tests__/__snapshots__/stl.hoge | 10 +++++----- hogvm/__tests__/__snapshots__/stl.js | 2 +- hogvm/__tests__/__snapshots__/stl.stdout | 2 +- hogvm/__tests__/stl.hog | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hogvm/__tests__/__snapshots__/stl.hoge b/hogvm/__tests__/__snapshots__/stl.hoge index dfd0f51d312ca..08000276db21c 100644 --- a/hogvm/__tests__/__snapshots__/stl.hoge +++ b/hogvm/__tests__/__snapshots__/stl.hoge @@ -54,11 +54,11 @@ 32, "day", 33, 5, 32, "2024-12-18", 2, "toDate", 1, 2, "dateAdd", 3, 2, "dateDiff", 3, 2, "print", 2, 35, 32, "day", 32, "2024-12-18T12:34:56Z", 2, "toDateTime", 1, 2, "dateTrunc", 2, 2, "print", 1, 35, 32, "2024-12-18", 2, "toDate", 1, 33, 3, 2, "addDays", 2, 2, "print", 1, 35, 33, 5, 2, "toIntervalDay", 1, 33, 2, 2, "toIntervalMonth", 1, 2, "print", 2, 35, -2, "today", 0, 2, "print", 1, 35, 32, "", 2, "print", 1, 35, 32, "-- json --", 2, "print", 1, 35, 32, "{\"a\":123.1}", -32, "a", 2, "JSONExtractInt", 2, 2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, "JSONExtractInt", 2, 2, -"jsonStringify", 1, 2, "print", 2, 35, 32, "{\"a\":123.1}", 32, "a", 2, "JSONExtractFloat", 2, 2, "jsonStringify", 1, -32, "{\"a\":\"hello\"}", 32, "a", 2, "JSONExtractFloat", 2, 2, "jsonStringify", 1, 2, "print", 2, 35, 32, -"{\"a\":123.1}", 32, "a", 2, "JSONExtractString", 2, 2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, +2, "today", 0, 2, "typeof", 1, 2, "print", 1, 35, 32, "", 2, "print", 1, 35, 32, "-- json --", 2, "print", 1, 35, 32, +"{\"a\":123.1}", 32, "a", 2, "JSONExtractInt", 2, 2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, +"JSONExtractInt", 2, 2, "jsonStringify", 1, 2, "print", 2, 35, 32, "{\"a\":123.1}", 32, "a", 2, "JSONExtractFloat", 2, +2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, "JSONExtractFloat", 2, 2, "jsonStringify", 1, 2, "print", 2, +35, 32, "{\"a\":123.1}", 32, "a", 2, "JSONExtractString", 2, 2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, "JSONExtractString", 2, 2, "jsonStringify", 1, 2, "print", 2, 35, 32, "{\"a\":123}", 32, "a", 2, "JSONExtractArrayRaw", 2, 2, "jsonStringify", 1, 32, "{\"a\":\"hello\"}", 32, "a", 2, "JSONExtractArrayRaw", 2, 2, "jsonStringify", 1, 2, "print", 2, 35, 32, "{\"a\":[]}", 32, "a", 2, "JSONExtractArrayRaw", 2, 2, "jsonStringify", 1, 32, diff --git a/hogvm/__tests__/__snapshots__/stl.js b/hogvm/__tests__/__snapshots__/stl.js index adb05950b3ece..247aa1ec4abed 100644 --- a/hogvm/__tests__/__snapshots__/stl.js +++ b/hogvm/__tests__/__snapshots__/stl.js @@ -542,7 +542,7 @@ print(dateAdd("day", 1, toDate("2024-12-18")), dateDiff("day", toDate("2024-12-1 print(dateTrunc("day", toDateTime("2024-12-18T12:34:56Z"))); print(addDays(toDate("2024-12-18"), 3)); print(toIntervalDay(5), toIntervalMonth(2)); -print(today()); +print(__x_typeof(today())); print(""); print("-- json --"); print(jsonStringify(JSONExtractInt("{\"a\":123.1}", "a")), jsonStringify(JSONExtractInt("{\"a\":\"hello\"}", "a"))); diff --git a/hogvm/__tests__/__snapshots__/stl.stdout b/hogvm/__tests__/__snapshots__/stl.stdout index c5ef6cd2b98b7..b9f6eabbc5c82 100644 --- a/hogvm/__tests__/__snapshots__/stl.stdout +++ b/hogvm/__tests__/__snapshots__/stl.stdout @@ -100,7 +100,7 @@ Date(2024, 12, 19) 5 DateTime(1734480000.0, 'UTC') Date(2024, 12, 21) {'__hogInterval__': true, 'value': 5, 'unit': 'day'} {'__hogInterval__': true, 'value': 2, 'unit': 'month'} -Date(2024, 12, 19) +date -- json -- 123 null diff --git a/hogvm/__tests__/stl.hog b/hogvm/__tests__/stl.hog index 8d0656573de4f..a00871f041b38 100644 --- a/hogvm/__tests__/stl.hog +++ b/hogvm/__tests__/stl.hog @@ -100,7 +100,7 @@ print(dateAdd('day', 1, toDate('2024-12-18')), dateDiff('day', toDate('2024-12-1 print(dateTrunc('day', toDateTime('2024-12-18T12:34:56Z'))) print(addDays(toDate('2024-12-18'), 3)) print(toIntervalDay(5), toIntervalMonth(2)) -print(today()) +print(typeof(today())) print('') print('-- json --') print(jsonStringify(JSONExtractInt('{"a":123.1}', 'a')), jsonStringify(JSONExtractInt('{"a":"hello"}','a')))