diff --git a/node-red/flows_js/change.6a32e693078a19ae.flows.js b/node-red/flows_js/change.6a32e693078a19ae.flows.js index 43741d85..b291dbd6 100644 --- a/node-red/flows_js/change.6a32e693078a19ae.flows.js +++ b/node-red/flows_js/change.6a32e693078a19ae.flows.js @@ -25,7 +25,7 @@ const Node = { "f3b8f8dbbccacb91" ] ], - "_order": 134 + "_order": 135 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/change.7a7a78cc9c9515cd.flows.js b/node-red/flows_js/change.7a7a78cc9c9515cd.flows.js index ba563735..5845085a 100644 --- a/node-red/flows_js/change.7a7a78cc9c9515cd.flows.js +++ b/node-red/flows_js/change.7a7a78cc9c9515cd.flows.js @@ -38,15 +38,15 @@ const Node = { "t": "set", "p": "query_param1", "pt": "flow", - "to": "2023-09-07", - "tot": "str" + "to": "sidste_bankdag", + "tot": "global" }, { "t": "set", "p": "query_param2", "pt": "flow", - "to": "2023-09-07", - "tot": "str" + "to": "sidste_bankdag", + "tot": "global" }, { "t": "set", diff --git a/node-red/flows_js/change.9b26ba95b89a2750.flows.js b/node-red/flows_js/change.9b26ba95b89a2750.flows.js index 7ad4c43a..607aaa40 100644 --- a/node-red/flows_js/change.9b26ba95b89a2750.flows.js +++ b/node-red/flows_js/change.9b26ba95b89a2750.flows.js @@ -25,7 +25,7 @@ const Node = { "14d9ba41e0d56ad1" ] ], - "_order": 125 + "_order": 126 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/change.c01dce8d75f539b1.flows.js b/node-red/flows_js/change.c01dce8d75f539b1.flows.js index 95cc1e3a..0858f339 100644 --- a/node-red/flows_js/change.c01dce8d75f539b1.flows.js +++ b/node-red/flows_js/change.c01dce8d75f539b1.flows.js @@ -80,7 +80,7 @@ const Node = { "y": 80, "wires": [ [ - "7a7a78cc9c9515cd" + "1b8cc635649a4519" ] ], "_order": 92 diff --git a/node-red/flows_js/change.ce6f40117064f2be.flows.js b/node-red/flows_js/change.ce6f40117064f2be.flows.js index fb73e01d..5bfe2c47 100644 --- a/node-red/flows_js/change.ce6f40117064f2be.flows.js +++ b/node-red/flows_js/change.ce6f40117064f2be.flows.js @@ -39,7 +39,7 @@ const Node = { "60ce3b97bd606829" ] ], - "_order": 111 + "_order": 112 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/csv.3c958764798b548b.flows.js b/node-red/flows_js/csv.3c958764798b548b.flows.js index 6d100d0b..7ccf25b5 100644 --- a/node-red/flows_js/csv.3c958764798b548b.flows.js +++ b/node-red/flows_js/csv.3c958764798b548b.flows.js @@ -21,7 +21,7 @@ const Node = { "884b223c101e2573" ] ], - "_order": 137 + "_order": 138 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/debug.178aa671cc1362db.flows.js b/node-red/flows_js/debug.178aa671cc1362db.flows.js index a46b553b..ce759bfa 100644 --- a/node-red/flows_js/debug.178aa671cc1362db.flows.js +++ b/node-red/flows_js/debug.178aa671cc1362db.flows.js @@ -15,7 +15,7 @@ const Node = { "x": 470, "y": 140, "wires": [], - "_order": 110 + "_order": 111 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/debug.f3b8f8dbbccacb91.flows.js b/node-red/flows_js/debug.f3b8f8dbbccacb91.flows.js index 04237a32..aabbbdd0 100644 --- a/node-red/flows_js/debug.f3b8f8dbbccacb91.flows.js +++ b/node-red/flows_js/debug.f3b8f8dbbccacb91.flows.js @@ -15,7 +15,7 @@ const Node = { "x": 480, "y": 160, "wires": [], - "_order": 135 + "_order": 136 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/file.60ce3b97bd606829.flows.js b/node-red/flows_js/file.60ce3b97bd606829.flows.js index 8d4500c5..5750c574 100644 --- a/node-red/flows_js/file.60ce3b97bd606829.flows.js +++ b/node-red/flows_js/file.60ce3b97bd606829.flows.js @@ -17,7 +17,7 @@ const Node = { "178aa671cc1362db" ] ], - "_order": 112 + "_order": 113 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/file_in.7159e807e16562c2.flows.js b/node-red/flows_js/file_in.7159e807e16562c2.flows.js index 9ce906eb..6f63b247 100644 --- a/node-red/flows_js/file_in.7159e807e16562c2.flows.js +++ b/node-red/flows_js/file_in.7159e807e16562c2.flows.js @@ -18,7 +18,7 @@ const Node = { "3c958764798b548b" ] ], - "_order": 133 + "_order": 134 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/function.1b8cc635649a4519.flows.js b/node-red/flows_js/function.1b8cc635649a4519.flows.js new file mode 100644 index 00000000..a53e2cc9 --- /dev/null +++ b/node-red/flows_js/function.1b8cc635649a4519.flows.js @@ -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; \ No newline at end of file diff --git a/node-red/flows_js/function.329ceb4beeb16d5c.flows.js b/node-red/flows_js/function.329ceb4beeb16d5c.flows.js index 68e0917c..7cd7fd71 100644 --- a/node-red/flows_js/function.329ceb4beeb16d5c.flows.js +++ b/node-red/flows_js/function.329ceb4beeb16d5c.flows.js @@ -17,7 +17,7 @@ const Node = { "6a32e693078a19ae" ] ], - "_order": 139 + "_order": 140 } Node.func = async function (node, msg, RED, context, flow, global, env, util) { diff --git a/node-red/flows_js/function.884b223c101e2573.flows.js b/node-red/flows_js/function.884b223c101e2573.flows.js index 5bcdaa39..45361285 100644 --- a/node-red/flows_js/function.884b223c101e2573.flows.js +++ b/node-red/flows_js/function.884b223c101e2573.flows.js @@ -22,7 +22,7 @@ const Node = { "329ceb4beeb16d5c" ] ], - "_order": 136 + "_order": 137 } Node.func = async function (node, msg, RED, context, flow, global, env, util, csv) { diff --git a/node-red/flows_js/group.8d5c48f3ea7b5469.flows.js b/node-red/flows_js/group.8d5c48f3ea7b5469.flows.js index f0810e1f..f92b89d7 100644 --- a/node-red/flows_js/group.8d5c48f3ea7b5469.flows.js +++ b/node-red/flows_js/group.8d5c48f3ea7b5469.flows.js @@ -20,8 +20,6 @@ const Node = { ], "x": 14, "y": 19, - "w": 612, - "h": 162, "_order": 6 } diff --git a/node-red/flows_js/group.9b6c10170cad638d.flows.js b/node-red/flows_js/group.9b6c10170cad638d.flows.js index 49178b64..56f96db6 100644 --- a/node-red/flows_js/group.9b6c10170cad638d.flows.js +++ b/node-red/flows_js/group.9b6c10170cad638d.flows.js @@ -18,8 +18,6 @@ const Node = { ], "x": 634, "y": 99, - "w": 472, - "h": 82, "_order": 17 } diff --git a/node-red/flows_js/group.a72cb7bc6d1977da.flows.js b/node-red/flows_js/group.a72cb7bc6d1977da.flows.js index 4c811d40..b3546f2a 100644 --- a/node-red/flows_js/group.a72cb7bc6d1977da.flows.js +++ b/node-red/flows_js/group.a72cb7bc6d1977da.flows.js @@ -19,8 +19,6 @@ const Node = { ], "x": 14, "y": 199, - "w": 852, - "h": 82, "_order": 15 } diff --git a/node-red/flows_js/group.c076bc29b23b9bd7.flows.js b/node-red/flows_js/group.c076bc29b23b9bd7.flows.js index 4baecf82..5e6caf24 100644 --- a/node-red/flows_js/group.c076bc29b23b9bd7.flows.js +++ b/node-red/flows_js/group.c076bc29b23b9bd7.flows.js @@ -19,8 +19,6 @@ const Node = { ], "x": 14, "y": 279, - "w": 852, - "h": 82, "_order": 14 } diff --git a/node-red/flows_js/group.e5fafc3bcb2d4365.flows.js b/node-red/flows_js/group.e5fafc3bcb2d4365.flows.js index faf4997d..c6731e24 100644 --- a/node-red/flows_js/group.e5fafc3bcb2d4365.flows.js +++ b/node-red/flows_js/group.e5fafc3bcb2d4365.flows.js @@ -18,8 +18,6 @@ const Node = { ], "x": 634, "y": 19, - "w": 472, - "h": 82, "_order": 16 } diff --git a/node-red/flows_js/group.fe8a8f3f224328c7.flows.js b/node-red/flows_js/group.fe8a8f3f224328c7.flows.js index d6ecc59e..bde95908 100644 --- a/node-red/flows_js/group.fe8a8f3f224328c7.flows.js +++ b/node-red/flows_js/group.fe8a8f3f224328c7.flows.js @@ -19,7 +19,8 @@ const Node = { "41b71a21957d00b8", "c01dce8d75f539b1", "f617b313a0fcae8a", - "4d23e13748673590" + "4d23e13748673590", + "1b8cc635649a4519" ], "x": 14, "y": 19, diff --git a/node-red/flows_js/http_in.b0e39349dace8a93.flows.js b/node-red/flows_js/http_in.b0e39349dace8a93.flows.js index bc5aa441..4a7edc9d 100644 --- a/node-red/flows_js/http_in.b0e39349dace8a93.flows.js +++ b/node-red/flows_js/http_in.b0e39349dace8a93.flows.js @@ -15,7 +15,7 @@ const Node = { "794334051db22622" ] ], - "_order": 116 + "_order": 117 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/http_in.d5371aca9854e30c.flows.js b/node-red/flows_js/http_in.d5371aca9854e30c.flows.js index 85224ea5..c8f15780 100644 --- a/node-red/flows_js/http_in.d5371aca9854e30c.flows.js +++ b/node-red/flows_js/http_in.d5371aca9854e30c.flows.js @@ -15,7 +15,7 @@ const Node = { "bf697fc17e7f5c3b" ] ], - "_order": 113 + "_order": 114 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/http_response.c6d1705c23bbcb66.flows.js b/node-red/flows_js/http_response.c6d1705c23bbcb66.flows.js index 3e49a719..e8d2a91c 100644 --- a/node-red/flows_js/http_response.c6d1705c23bbcb66.flows.js +++ b/node-red/flows_js/http_response.c6d1705c23bbcb66.flows.js @@ -9,7 +9,7 @@ const Node = { "x": 730, "y": 240, "wires": [], - "_order": 118 + "_order": 119 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/http_response.eaa7010fccf43e50.flows.js b/node-red/flows_js/http_response.eaa7010fccf43e50.flows.js index 4ee17481..aba1a817 100644 --- a/node-red/flows_js/http_response.eaa7010fccf43e50.flows.js +++ b/node-red/flows_js/http_response.eaa7010fccf43e50.flows.js @@ -9,7 +9,7 @@ const Node = { "x": 730, "y": 320, "wires": [], - "_order": 115 + "_order": 116 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/inject.8163b300c375f9d4.flows.js b/node-red/flows_js/inject.8163b300c375f9d4.flows.js index 39b591d6..9e36c853 100644 --- a/node-red/flows_js/inject.8163b300c375f9d4.flows.js +++ b/node-red/flows_js/inject.8163b300c375f9d4.flows.js @@ -23,7 +23,7 @@ const Node = { "7159e807e16562c2" ] ], - "_order": 138 + "_order": 139 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/json.14d9ba41e0d56ad1.flows.js b/node-red/flows_js/json.14d9ba41e0d56ad1.flows.js index 6223ccd2..d8315fd3 100644 --- a/node-red/flows_js/json.14d9ba41e0d56ad1.flows.js +++ b/node-red/flows_js/json.14d9ba41e0d56ad1.flows.js @@ -14,7 +14,7 @@ const Node = { "b871d525930b247c" ] ], - "_order": 126 + "_order": 127 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/json.36410fa515ba936d.flows.js b/node-red/flows_js/json.36410fa515ba936d.flows.js index 97b9a0a7..356a1f80 100644 --- a/node-red/flows_js/json.36410fa515ba936d.flows.js +++ b/node-red/flows_js/json.36410fa515ba936d.flows.js @@ -14,7 +14,7 @@ const Node = { "ce6f40117064f2be" ] ], - "_order": 109 + "_order": 110 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_call.13f11dcbe9876165.flows.js b/node-red/flows_js/link_call.13f11dcbe9876165.flows.js index 5bbf2f24..596a406a 100644 --- a/node-red/flows_js/link_call.13f11dcbe9876165.flows.js +++ b/node-red/flows_js/link_call.13f11dcbe9876165.flows.js @@ -16,7 +16,7 @@ const Node = { "c6d1705c23bbcb66" ] ], - "_order": 132 + "_order": 133 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_call.794334051db22622.flows.js b/node-red/flows_js/link_call.794334051db22622.flows.js index 0b0883ef..2ab72819 100644 --- a/node-red/flows_js/link_call.794334051db22622.flows.js +++ b/node-red/flows_js/link_call.794334051db22622.flows.js @@ -16,7 +16,7 @@ const Node = { "4787b43fdde8f910" ] ], - "_order": 127 + "_order": 128 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_call.7b5552a2187320fb.flows.js b/node-red/flows_js/link_call.7b5552a2187320fb.flows.js index c030c19c..ca39975d 100644 --- a/node-red/flows_js/link_call.7b5552a2187320fb.flows.js +++ b/node-red/flows_js/link_call.7b5552a2187320fb.flows.js @@ -16,7 +16,7 @@ const Node = { "eaa7010fccf43e50" ] ], - "_order": 122 + "_order": 123 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_call.bf697fc17e7f5c3b.flows.js b/node-red/flows_js/link_call.bf697fc17e7f5c3b.flows.js index 88662e30..fd2ea6f5 100644 --- a/node-red/flows_js/link_call.bf697fc17e7f5c3b.flows.js +++ b/node-red/flows_js/link_call.bf697fc17e7f5c3b.flows.js @@ -16,7 +16,7 @@ const Node = { "554f33cc9a0f201b" ] ], - "_order": 121 + "_order": 122 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_in.8419321d8d9b789c.flows.js b/node-red/flows_js/link_in.8419321d8d9b789c.flows.js index d2cf7d1b..e99d9f36 100644 --- a/node-red/flows_js/link_in.8419321d8d9b789c.flows.js +++ b/node-red/flows_js/link_in.8419321d8d9b789c.flows.js @@ -12,7 +12,7 @@ const Node = { "9b26ba95b89a2750" ] ], - "_order": 123 + "_order": 124 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_in.e07e88f5f8811b3b.flows.js b/node-red/flows_js/link_in.e07e88f5f8811b3b.flows.js index cdc49811..f846c36c 100644 --- a/node-red/flows_js/link_in.e07e88f5f8811b3b.flows.js +++ b/node-red/flows_js/link_in.e07e88f5f8811b3b.flows.js @@ -12,7 +12,7 @@ const Node = { "744a5518444006a9" ] ], - "_order": 128 + "_order": 129 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_out.b871d525930b247c.flows.js b/node-red/flows_js/link_out.b871d525930b247c.flows.js index 3753b01e..1eb146d7 100644 --- a/node-red/flows_js/link_out.b871d525930b247c.flows.js +++ b/node-red/flows_js/link_out.b871d525930b247c.flows.js @@ -9,7 +9,7 @@ const Node = { "x": 1065, "y": 60, "wires": [], - "_order": 124 + "_order": 125 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/link_out.dda8e81914a372dc.flows.js b/node-red/flows_js/link_out.dda8e81914a372dc.flows.js index d3efe9ec..df52e923 100644 --- a/node-red/flows_js/link_out.dda8e81914a372dc.flows.js +++ b/node-red/flows_js/link_out.dda8e81914a372dc.flows.js @@ -9,7 +9,7 @@ const Node = { "x": 1065, "y": 140, "wires": [], - "_order": 129 + "_order": 130 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/template.4787b43fdde8f910.flows.js b/node-red/flows_js/template.4787b43fdde8f910.flows.js index 53934e89..60ee5de8 100644 --- a/node-red/flows_js/template.4787b43fdde8f910.flows.js +++ b/node-red/flows_js/template.4787b43fdde8f910.flows.js @@ -16,7 +16,7 @@ const Node = { "13f11dcbe9876165" ] ], - "_order": 117 + "_order": 118 } Node.template = ` diff --git a/node-red/flows_js/template.554f33cc9a0f201b.flows.js b/node-red/flows_js/template.554f33cc9a0f201b.flows.js index 2d954fdb..1232441f 100644 --- a/node-red/flows_js/template.554f33cc9a0f201b.flows.js +++ b/node-red/flows_js/template.554f33cc9a0f201b.flows.js @@ -16,7 +16,7 @@ const Node = { "7b5552a2187320fb" ] ], - "_order": 114 + "_order": 115 } Node.template = ` diff --git a/node-red/flows_js/template.722760115195719b.flows.js b/node-red/flows_js/template.722760115195719b.flows.js index 7d8b8cdd..5b370bed 100644 --- a/node-red/flows_js/template.722760115195719b.flows.js +++ b/node-red/flows_js/template.722760115195719b.flows.js @@ -14,7 +14,7 @@ const Node = { "wires": [ [] ], - "_order": 119 + "_order": 120 } Node.template = ` diff --git a/node-red/flows_js/template.744a5518444006a9.flows.js b/node-red/flows_js/template.744a5518444006a9.flows.js index b4160723..1e7dabe7 100644 --- a/node-red/flows_js/template.744a5518444006a9.flows.js +++ b/node-red/flows_js/template.744a5518444006a9.flows.js @@ -16,7 +16,7 @@ const Node = { "d2465ea9ceb83c7d" ] ], - "_order": 130 + "_order": 131 } Node.template = ` diff --git a/node-red/flows_js/template.d2465ea9ceb83c7d.flows.js b/node-red/flows_js/template.d2465ea9ceb83c7d.flows.js index bf16df7f..5d4892c9 100644 --- a/node-red/flows_js/template.d2465ea9ceb83c7d.flows.js +++ b/node-red/flows_js/template.d2465ea9ceb83c7d.flows.js @@ -16,7 +16,7 @@ const Node = { "dda8e81914a372dc" ] ], - "_order": 131 + "_order": 132 } Node.template = ` diff --git a/node-red/flows_js/websocket_in.22016145c098118e.flows.js b/node-red/flows_js/websocket_in.22016145c098118e.flows.js index 90888d6a..8d55f649 100644 --- a/node-red/flows_js/websocket_in.22016145c098118e.flows.js +++ b/node-red/flows_js/websocket_in.22016145c098118e.flows.js @@ -13,7 +13,7 @@ const Node = { "36410fa515ba936d" ] ], - "_order": 108 + "_order": 109 } module.exports = Node; \ No newline at end of file diff --git a/node-red/flows_js/websocket_in.9e858cef8327f0d0.flows.js b/node-red/flows_js/websocket_in.9e858cef8327f0d0.flows.js index 8db586e6..abbb6c32 100644 --- a/node-red/flows_js/websocket_in.9e858cef8327f0d0.flows.js +++ b/node-red/flows_js/websocket_in.9e858cef8327f0d0.flows.js @@ -13,7 +13,7 @@ const Node = { "36410fa515ba936d" ] ], - "_order": 120 + "_order": 121 } module.exports = Node; \ No newline at end of file