diff --git a/src/core/operations/TranslateDateTimeFormat.mjs b/src/core/operations/TranslateDateTimeFormat.mjs index 6a60f6f0..7f956875 100644 --- a/src/core/operations/TranslateDateTimeFormat.mjs +++ b/src/core/operations/TranslateDateTimeFormat.mjs @@ -60,7 +60,7 @@ class TranslateDateTimeFormat extends Operation { * @returns {html} */ run(input, args) { - const [inputFormat, inputTimezone, outputFormat, outputTimezone] = args; + const [inputFormat, inputTimezone, outputFormat, outputTimezone] = args.slice(1); let date; try { diff --git a/test/tests/nodeApi/ops.mjs b/test/tests/nodeApi/ops.mjs index c1563774..df54dd96 100644 --- a/test/tests/nodeApi/ops.mjs +++ b/test/tests/nodeApi/ops.mjs @@ -962,7 +962,7 @@ smothering ampersand abreast }), it("Translate DateTime format", () => { - assert.strictEqual(chef.translateDateTimeFormat("01/04/1999 22:33:01").toString(), "01/04/1999 22:33:01"); + assert.strictEqual(chef.translateDateTimeFormat("01/04/1999 22:33:01").toString(), "Thursday 1st April 1999 22:33:01 +00:00 UTC"); }), it("Triple DES encrypt / decrypt", () => {