1
0
mirror of synced 2024-11-17 03:27:13 +01:00

fix translatreDateTimeFormat args assignment error

This commit is contained in:
d98762625 2018-08-16 17:19:23 +01:00
parent 7557f43f77
commit 8f85e57fc5
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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", () => {