Skip to content

Commit

Permalink
dynamisk generering af seneste lukkede bankdato
Browse files Browse the repository at this point in the history
  • Loading branch information
CSL-randers committed Sep 26, 2023
1 parent ed011ec commit aaa4f42
Show file tree
Hide file tree
Showing 41 changed files with 83 additions and 48 deletions.
2 changes: 1 addition & 1 deletion node-red/flows_js/change.6a32e693078a19ae.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Node = {
"f3b8f8dbbccacb91"
]
],
"_order": 134
"_order": 135
}

module.exports = Node;
8 changes: 4 additions & 4 deletions node-red/flows_js/change.7a7a78cc9c9515cd.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/change.9b26ba95b89a2750.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Node = {
"14d9ba41e0d56ad1"
]
],
"_order": 125
"_order": 126
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/change.c01dce8d75f539b1.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Node = {
"y": 80,
"wires": [
[
"7a7a78cc9c9515cd"
"1b8cc635649a4519"
]
],
"_order": 92
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/change.ce6f40117064f2be.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Node = {
"60ce3b97bd606829"
]
],
"_order": 111
"_order": 112
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/csv.3c958764798b548b.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Node = {
"884b223c101e2573"
]
],
"_order": 137
"_order": 138
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/debug.178aa671cc1362db.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Node = {
"x": 470,
"y": 140,
"wires": [],
"_order": 110
"_order": 111
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/debug.f3b8f8dbbccacb91.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Node = {
"x": 480,
"y": 160,
"wires": [],
"_order": 135
"_order": 136
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/file.60ce3b97bd606829.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Node = {
"178aa671cc1362db"
]
],
"_order": 112
"_order": 113
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/file_in.7159e807e16562c2.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Node = {
"3c958764798b548b"
]
],
"_order": 133
"_order": 134
}

module.exports = Node;
44 changes: 44 additions & 0 deletions node-red/flows_js/function.1b8cc635649a4519.flows.js
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;
2 changes: 1 addition & 1 deletion node-red/flows_js/function.329ceb4beeb16d5c.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Node = {
"6a32e693078a19ae"
]
],
"_order": 139
"_order": 140
}

Node.func = async function (node, msg, RED, context, flow, global, env, util) {
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/function.884b223c101e2573.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Node = {
"329ceb4beeb16d5c"
]
],
"_order": 136
"_order": 137
}

Node.func = async function (node, msg, RED, context, flow, global, env, util, csv) {
Expand Down
2 changes: 0 additions & 2 deletions node-red/flows_js/group.8d5c48f3ea7b5469.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const Node = {
],
"x": 14,
"y": 19,
"w": 612,
"h": 162,
"_order": 6
}

Expand Down
2 changes: 0 additions & 2 deletions node-red/flows_js/group.9b6c10170cad638d.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const Node = {
],
"x": 634,
"y": 99,
"w": 472,
"h": 82,
"_order": 17
}

Expand Down
2 changes: 0 additions & 2 deletions node-red/flows_js/group.a72cb7bc6d1977da.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const Node = {
],
"x": 14,
"y": 199,
"w": 852,
"h": 82,
"_order": 15
}

Expand Down
2 changes: 0 additions & 2 deletions node-red/flows_js/group.c076bc29b23b9bd7.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const Node = {
],
"x": 14,
"y": 279,
"w": 852,
"h": 82,
"_order": 14
}

Expand Down
2 changes: 0 additions & 2 deletions node-red/flows_js/group.e5fafc3bcb2d4365.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const Node = {
],
"x": 634,
"y": 19,
"w": 472,
"h": 82,
"_order": 16
}

Expand Down
3 changes: 2 additions & 1 deletion node-red/flows_js/group.fe8a8f3f224328c7.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const Node = {
"41b71a21957d00b8",
"c01dce8d75f539b1",
"f617b313a0fcae8a",
"4d23e13748673590"
"4d23e13748673590",
"1b8cc635649a4519"
],
"x": 14,
"y": 19,
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/http_in.b0e39349dace8a93.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Node = {
"794334051db22622"
]
],
"_order": 116
"_order": 117
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/http_in.d5371aca9854e30c.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Node = {
"bf697fc17e7f5c3b"
]
],
"_order": 113
"_order": 114
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/http_response.c6d1705c23bbcb66.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Node = {
"x": 730,
"y": 240,
"wires": [],
"_order": 118
"_order": 119
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/http_response.eaa7010fccf43e50.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Node = {
"x": 730,
"y": 320,
"wires": [],
"_order": 115
"_order": 116
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/inject.8163b300c375f9d4.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Node = {
"7159e807e16562c2"
]
],
"_order": 138
"_order": 139
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/json.14d9ba41e0d56ad1.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Node = {
"b871d525930b247c"
]
],
"_order": 126
"_order": 127
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/json.36410fa515ba936d.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Node = {
"ce6f40117064f2be"
]
],
"_order": 109
"_order": 110
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_call.13f11dcbe9876165.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"c6d1705c23bbcb66"
]
],
"_order": 132
"_order": 133
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_call.794334051db22622.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"4787b43fdde8f910"
]
],
"_order": 127
"_order": 128
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_call.7b5552a2187320fb.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"eaa7010fccf43e50"
]
],
"_order": 122
"_order": 123
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_call.bf697fc17e7f5c3b.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"554f33cc9a0f201b"
]
],
"_order": 121
"_order": 122
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_in.8419321d8d9b789c.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Node = {
"9b26ba95b89a2750"
]
],
"_order": 123
"_order": 124
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_in.e07e88f5f8811b3b.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Node = {
"744a5518444006a9"
]
],
"_order": 128
"_order": 129
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_out.b871d525930b247c.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Node = {
"x": 1065,
"y": 60,
"wires": [],
"_order": 124
"_order": 125
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/link_out.dda8e81914a372dc.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Node = {
"x": 1065,
"y": 140,
"wires": [],
"_order": 129
"_order": 130
}

module.exports = Node;
2 changes: 1 addition & 1 deletion node-red/flows_js/template.4787b43fdde8f910.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"13f11dcbe9876165"
]
],
"_order": 117
"_order": 118
}

Node.template = `
Expand Down
2 changes: 1 addition & 1 deletion node-red/flows_js/template.554f33cc9a0f201b.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Node = {
"7b5552a2187320fb"
]
],
"_order": 114
"_order": 115
}

Node.template = `
Expand Down
Loading

0 comments on commit aaa4f42

Please sign in to comment.