mirror of
https://github.com/gchq/CyberChef
synced 2024-12-28 21:43:21 +00:00
Update DateTime.mjs
Add test for time-delta
This commit is contained in:
parent
61d587a4a5
commit
d2ff03cea4
1 changed files with 22 additions and 0 deletions
|
@ -31,4 +31,26 @@ TestRegister.addTests([
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "DateTime Delta Positive",
|
||||
input: "20/02/2024 13:36:00",
|
||||
expectedOutput: "20/02/2024 13:37:00",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "DateTime Delta",
|
||||
args: ["Standard date and time", "DD/MM/YYYY HH:mm:ss", "+0.0:01:0"],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "DateTime Delta Negative",
|
||||
input: "20/02/2024 14:37:00",
|
||||
expectedOutput: "20/02/2024 13:37:00",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "DateTime Delta",
|
||||
args: ["Standard date and time", "DD/MM/YYYY HH:mm:ss", "-0.1:00:0"],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue