generated from Randers-Kommune-Digitalisering/node-red-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dynamisk generering af seneste lukkede bankdato
- Loading branch information
1 parent
ed011ec
commit aaa4f42
Showing
41 changed files
with
83 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ const Node = { | |
"f3b8f8dbbccacb91" | ||
] | ||
], | ||
"_order": 134 | ||
"_order": 135 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ const Node = { | |
"14d9ba41e0d56ad1" | ||
] | ||
], | ||
"_order": 125 | ||
"_order": 126 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ const Node = { | |
"y": 80, | ||
"wires": [ | ||
[ | ||
"7a7a78cc9c9515cd" | ||
"1b8cc635649a4519" | ||
] | ||
], | ||
"_order": 92 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ const Node = { | |
"60ce3b97bd606829" | ||
] | ||
], | ||
"_order": 111 | ||
"_order": 112 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ const Node = { | |
"884b223c101e2573" | ||
] | ||
], | ||
"_order": 137 | ||
"_order": 138 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ const Node = { | |
"x": 470, | ||
"y": 140, | ||
"wires": [], | ||
"_order": 110 | ||
"_order": 111 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ const Node = { | |
"x": 480, | ||
"y": 160, | ||
"wires": [], | ||
"_order": 135 | ||
"_order": 136 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ const Node = { | |
"178aa671cc1362db" | ||
] | ||
], | ||
"_order": 112 | ||
"_order": 113 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ const Node = { | |
"3c958764798b548b" | ||
] | ||
], | ||
"_order": 133 | ||
"_order": 134 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const Node = { | ||
"id": "1b8cc635649a4519", | ||
"type": "function", | ||
"z": "0b526691b09a2646", | ||
"g": "fe8a8f3f224328c7", | ||
"name": "Sidste bankdag", | ||
"func": "", | ||
"outputs": 1, | ||
"noerr": 0, | ||
"initialize": "", | ||
"finalize": "", | ||
"libs": [], | ||
"x": 460, | ||
"y": 80, | ||
"wires": [ | ||
[ | ||
"7a7a78cc9c9515cd" | ||
] | ||
], | ||
"_order": 108 | ||
} | ||
|
||
Node.func = async function (node, msg, RED, context, flow, global, env, util) { | ||
const today = new Date(); | ||
|
||
function sidsteBankdag() { | ||
if (today.getDay() === 1) { | ||
today.setDate(today.getDate() - 3); | ||
} else { | ||
today.setDate(today.getDate() - 1) | ||
} | ||
|
||
const year = today.getFullYear(); | ||
const month = String(today.getMonth() + 1).padStart(2, "0"); | ||
const day = String(today.getDate()).padStart(2, "0"); | ||
|
||
return `${year}-${month}-${day}`; | ||
} | ||
|
||
global.set("sidste_bankdag", sidsteBankdag()); | ||
return msg; | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ const Node = { | |
], | ||
"x": 14, | ||
"y": 19, | ||
"w": 612, | ||
"h": 162, | ||
"_order": 6 | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ const Node = { | |
], | ||
"x": 634, | ||
"y": 99, | ||
"w": 472, | ||
"h": 82, | ||
"_order": 17 | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,6 @@ const Node = { | |
], | ||
"x": 14, | ||
"y": 199, | ||
"w": 852, | ||
"h": 82, | ||
"_order": 15 | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,6 @@ const Node = { | |
], | ||
"x": 14, | ||
"y": 279, | ||
"w": 852, | ||
"h": 82, | ||
"_order": 14 | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ const Node = { | |
], | ||
"x": 634, | ||
"y": 19, | ||
"w": 472, | ||
"h": 82, | ||
"_order": 16 | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ const Node = { | |
"794334051db22622" | ||
] | ||
], | ||
"_order": 116 | ||
"_order": 117 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ const Node = { | |
"bf697fc17e7f5c3b" | ||
] | ||
], | ||
"_order": 113 | ||
"_order": 114 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ const Node = { | |
"x": 730, | ||
"y": 240, | ||
"wires": [], | ||
"_order": 118 | ||
"_order": 119 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ const Node = { | |
"x": 730, | ||
"y": 320, | ||
"wires": [], | ||
"_order": 115 | ||
"_order": 116 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ const Node = { | |
"7159e807e16562c2" | ||
] | ||
], | ||
"_order": 138 | ||
"_order": 139 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ const Node = { | |
"b871d525930b247c" | ||
] | ||
], | ||
"_order": 126 | ||
"_order": 127 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ const Node = { | |
"ce6f40117064f2be" | ||
] | ||
], | ||
"_order": 109 | ||
"_order": 110 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"c6d1705c23bbcb66" | ||
] | ||
], | ||
"_order": 132 | ||
"_order": 133 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"4787b43fdde8f910" | ||
] | ||
], | ||
"_order": 127 | ||
"_order": 128 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"eaa7010fccf43e50" | ||
] | ||
], | ||
"_order": 122 | ||
"_order": 123 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"554f33cc9a0f201b" | ||
] | ||
], | ||
"_order": 121 | ||
"_order": 122 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ const Node = { | |
"9b26ba95b89a2750" | ||
] | ||
], | ||
"_order": 123 | ||
"_order": 124 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ const Node = { | |
"744a5518444006a9" | ||
] | ||
], | ||
"_order": 128 | ||
"_order": 129 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ const Node = { | |
"x": 1065, | ||
"y": 60, | ||
"wires": [], | ||
"_order": 124 | ||
"_order": 125 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ const Node = { | |
"x": 1065, | ||
"y": 140, | ||
"wires": [], | ||
"_order": 129 | ||
"_order": 130 | ||
} | ||
|
||
module.exports = Node; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"13f11dcbe9876165" | ||
] | ||
], | ||
"_order": 117 | ||
"_order": 118 | ||
} | ||
|
||
Node.template = ` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const Node = { | |
"7b5552a2187320fb" | ||
] | ||
], | ||
"_order": 114 | ||
"_order": 115 | ||
} | ||
|
||
Node.template = ` | ||
|
Oops, something went wrong.