Skip to content

Commit 6eb9278

Browse files
committed
chore: release v7.5.1
* (klein0r) Added option for calendar week to Blockly * (klein0r) Fixed inpaired round brackets of getMinutes (Blockly)
1 parent 52e72a9 commit 6eb9278

14 files changed

+40
-33
lines changed

CHANGELOG_OLD.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
The newest change log is in README.md
2+
## 7.1.6 (2023-10-24)
3+
* (bluefox) Fixed pushover rules block
4+
25
## 7.1.5 (2023-10-09)
36
* (bluefox) Added play-ground for ChatGPT (API key required)
47

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Since v5.5.0 of the JavaScript adapter the following locations (relative to the
4646
<!--
4747
### **WORK IN PROGRESS**
4848
-->
49-
### **WORK IN PROGRESS**
49+
### 7.5.1 (2023-12-18)
5050

5151
* (klein0r) Added option for calendar week to Blockly
5252
* (klein0r) Fixed inpaired round brackets of getMinutes (Blockly)
@@ -81,9 +81,6 @@ NodeJS 16.x is required
8181
* (klein0r) Added text replacement, cound and reverse blocks
8282
* (klein0r) Added list reverse block
8383

84-
### 7.1.6 (2023-10-24)
85-
* (bluefox) Fixed pushover rules block
86-
8784
## License
8885
The MIT License (MIT)
8986

admin/asset-manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"files": {
3-
"main.js": "/static/js/main.e35235fb.js",
3+
"main.js": "/static/js/main.1b41e303.js",
44
"static/css/864.42bfc5f3.chunk.css": "/static/css/864.42bfc5f3.chunk.css",
5-
"static/js/864.12f7e04a.chunk.js": "/static/js/864.12f7e04a.chunk.js",
5+
"static/js/864.acfe4a15.chunk.js": "/static/js/864.acfe4a15.chunk.js",
66
"static/js/90.356ce273.chunk.js": "/static/js/90.356ce273.chunk.js",
77
"static/js/750.cbf4f684.chunk.js": "/static/js/750.cbf4f684.chunk.js",
88
"static/js/723.6006b5e8.chunk.js": "/static/js/723.6006b5e8.chunk.js",
@@ -157,9 +157,9 @@
157157
"static/media/Garage Doors.svg": "/static/media/Garage Doors.0c2a1cfca7ad1ea59625.svg",
158158
"static/media/Outdoor Blinds.svg": "/static/media/Outdoor Blinds.37b85a9c060a4af48da9.svg",
159159
"static/media/Upstairs.svg": "/static/media/Upstairs.441813e54e0daca0882d.svg",
160-
"main.e35235fb.js.map": "/static/js/main.e35235fb.js.map",
160+
"main.1b41e303.js.map": "/static/js/main.1b41e303.js.map",
161161
"864.42bfc5f3.chunk.css.map": "/static/css/864.42bfc5f3.chunk.css.map",
162-
"864.12f7e04a.chunk.js.map": "/static/js/864.12f7e04a.chunk.js.map",
162+
"864.acfe4a15.chunk.js.map": "/static/js/864.acfe4a15.chunk.js.map",
163163
"90.356ce273.chunk.js.map": "/static/js/90.356ce273.chunk.js.map",
164164
"750.cbf4f684.chunk.js.map": "/static/js/750.cbf4f684.chunk.js.map",
165165
"723.6006b5e8.chunk.js.map": "/static/js/723.6006b5e8.chunk.js.map",
@@ -189,6 +189,6 @@
189189
"360.59624b85.chunk.js.map": "/static/js/360.59624b85.chunk.js.map"
190190
},
191191
"entrypoints": [
192-
"static/js/main.e35235fb.js"
192+
"static/js/main.1b41e303.js"
193193
]
194194
}

admin/google-blockly/own/blocks_convert.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Blockly.Blocks.convert_from_date = {
172172
[Blockly.Translate('time_get_wdt') , 'wdt'],
173173
[Blockly.Translate('time_get_wdts') , 'wdts'],
174174
[Blockly.Translate('time_get_wd') , 'wd'],
175+
[Blockly.Translate('time_get_cw') , 'cw'],
175176
[Blockly.Translate('time_get_custom') , 'custom'],
176177
[Blockly.Translate('time_get_yyyy.mm.dd') , Blockly.Words['time_get_yyyy.mm.dd'] .format],
177178
[Blockly.Translate('time_get_yyyy/mm/dd') , Blockly.Words['time_get_yyyy/mm/dd'] .format],
@@ -267,7 +268,7 @@ Blockly.JavaScript.convert_from_date = function (block) {
267268
} else if (option === 'sid') {
268269
code = `(() => { const v = getDateObject(${value}); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`;
269270
} else if (option === 'm') {
270-
code = `getDateObject(${value}).getMinutes())`;
271+
code = `getDateObject(${value}).getMinutes()`;
271272
} else if (option === 'mid') {
272273
code = `(() => { const v = getDateObject(${value}); return v.getHours() * 60 + v.getMinutes(); })()`;
273274
} else if (option === 'h') {
@@ -290,6 +291,8 @@ Blockly.JavaScript.convert_from_date = function (block) {
290291
code = `formatDate(getDateObject(${value}), 'W', '${lang}')`;
291292
} else if (option === 'wd') {
292293
code = `(() => { const d = getDateObject(${value}).getDay(); return d === 0 ? 7 : d; })()`;
294+
} else if (option === 'cw') {
295+
code = `((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(getDateObject(${value}))`;
293296
} else if (option === 'custom') {
294297
code = `formatDate(getDateObject(${value}), '${format}')`;
295298
} else {

admin/google-blockly/own/blocks_time.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ Blockly.Blocks['time_get'] = {
314314
[Blockly.Translate('time_get_wdt') , 'wdt'],
315315
[Blockly.Translate('time_get_wdts') , 'wdts'],
316316
[Blockly.Translate('time_get_wd') , 'wd'],
317+
[Blockly.Translate('time_get_cw') , 'cw'],
317318
[Blockly.Translate('time_get_custom') , 'custom'],
318319
[Blockly.Translate('time_get_yyyy.mm.dd') , Blockly.Words['time_get_yyyy.mm.dd'] .format],
319320
[Blockly.Translate('time_get_yyyy/mm/dd') , Blockly.Words['time_get_yyyy/mm/dd'] .format],
@@ -431,6 +432,8 @@ Blockly.JavaScript['time_get'] = function(block) {
431432
code = `formatDate(new Date(), 'W', '${lang}')`;
432433
} else if (option === 'wd') {
433434
code = '(() => { const d = new Date().getDay(); return d === 0 ? 7 : d; })()';
435+
} else if (option === 'cw') {
436+
code = '((date) => { const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate())); const dayNum = d.getUTCDay() || 7; d.setUTCDate(d.getUTCDate() + 4 - dayNum); const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1)); return Math.ceil(((d.getTime() - yearStart.getTime()) / 86400000 + 1) / 7); })(new Date())';
434437
} else if (option === 'custom') {
435438
code = `formatDate(new Date(), '${format}')`;
436439
} else {

admin/google-blockly/own/blocks_words.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/static/js/864.12f7e04a.chunk.js renamed to admin/static/js/864.acfe4a15.chunk.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/static/js/864.12f7e04a.chunk.js.map renamed to admin/static/js/864.acfe4a15.chunk.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)