Skip to content

Commit

Permalink
chore: release v7.5.1
Browse files Browse the repository at this point in the history
* (klein0r) Added option for calendar week to Blockly
* (klein0r) Fixed inpaired round brackets of getMinutes (Blockly)
  • Loading branch information
klein0r committed Dec 18, 2023
1 parent 52e72a9 commit 6eb9278
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 33 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG_OLD.md
@@ -1,4 +1,7 @@
The newest change log is in README.md
## 7.1.6 (2023-10-24)
* (bluefox) Fixed pushover rules block

## 7.1.5 (2023-10-09)
* (bluefox) Added play-ground for ChatGPT (API key required)

Expand Down
5 changes: 1 addition & 4 deletions README.md
Expand Up @@ -46,7 +46,7 @@ Since v5.5.0 of the JavaScript adapter the following locations (relative to the
<!--
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
### 7.5.1 (2023-12-18)

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

### 7.1.6 (2023-10-24)
* (bluefox) Fixed pushover rules block

## License
The MIT License (MIT)

Expand Down
10 changes: 5 additions & 5 deletions admin/asset-manifest.json
@@ -1,8 +1,8 @@
{
"files": {
"main.js": "/static/js/main.e35235fb.js",
"main.js": "/static/js/main.1b41e303.js",
"static/css/864.42bfc5f3.chunk.css": "/static/css/864.42bfc5f3.chunk.css",
"static/js/864.12f7e04a.chunk.js": "/static/js/864.12f7e04a.chunk.js",
"static/js/864.acfe4a15.chunk.js": "/static/js/864.acfe4a15.chunk.js",
"static/js/90.356ce273.chunk.js": "/static/js/90.356ce273.chunk.js",
"static/js/750.cbf4f684.chunk.js": "/static/js/750.cbf4f684.chunk.js",
"static/js/723.6006b5e8.chunk.js": "/static/js/723.6006b5e8.chunk.js",
Expand Down Expand Up @@ -157,9 +157,9 @@
"static/media/Garage Doors.svg": "/static/media/Garage Doors.0c2a1cfca7ad1ea59625.svg",
"static/media/Outdoor Blinds.svg": "/static/media/Outdoor Blinds.37b85a9c060a4af48da9.svg",
"static/media/Upstairs.svg": "/static/media/Upstairs.441813e54e0daca0882d.svg",
"main.e35235fb.js.map": "/static/js/main.e35235fb.js.map",
"main.1b41e303.js.map": "/static/js/main.1b41e303.js.map",
"864.42bfc5f3.chunk.css.map": "/static/css/864.42bfc5f3.chunk.css.map",
"864.12f7e04a.chunk.js.map": "/static/js/864.12f7e04a.chunk.js.map",
"864.acfe4a15.chunk.js.map": "/static/js/864.acfe4a15.chunk.js.map",
"90.356ce273.chunk.js.map": "/static/js/90.356ce273.chunk.js.map",
"750.cbf4f684.chunk.js.map": "/static/js/750.cbf4f684.chunk.js.map",
"723.6006b5e8.chunk.js.map": "/static/js/723.6006b5e8.chunk.js.map",
Expand Down Expand Up @@ -189,6 +189,6 @@
"360.59624b85.chunk.js.map": "/static/js/360.59624b85.chunk.js.map"
},
"entrypoints": [
"static/js/main.e35235fb.js"
"static/js/main.1b41e303.js"
]
}
5 changes: 4 additions & 1 deletion admin/google-blockly/own/blocks_convert.js
Expand Up @@ -172,6 +172,7 @@ Blockly.Blocks.convert_from_date = {
[Blockly.Translate('time_get_wdt') , 'wdt'],
[Blockly.Translate('time_get_wdts') , 'wdts'],
[Blockly.Translate('time_get_wd') , 'wd'],
[Blockly.Translate('time_get_cw') , 'cw'],
[Blockly.Translate('time_get_custom') , 'custom'],
[Blockly.Translate('time_get_yyyy.mm.dd') , Blockly.Words['time_get_yyyy.mm.dd'] .format],
[Blockly.Translate('time_get_yyyy/mm/dd') , Blockly.Words['time_get_yyyy/mm/dd'] .format],
Expand Down Expand Up @@ -267,7 +268,7 @@ Blockly.JavaScript.convert_from_date = function (block) {
} else if (option === 'sid') {
code = `(() => { const v = getDateObject(${value}); return v.getHours() * 3600 + v.getMinutes() * 60 + v.getSeconds(); })()`;
} else if (option === 'm') {
code = `getDateObject(${value}).getMinutes())`;
code = `getDateObject(${value}).getMinutes()`;
} else if (option === 'mid') {
code = `(() => { const v = getDateObject(${value}); return v.getHours() * 60 + v.getMinutes(); })()`;
} else if (option === 'h') {
Expand All @@ -290,6 +291,8 @@ Blockly.JavaScript.convert_from_date = function (block) {
code = `formatDate(getDateObject(${value}), 'W', '${lang}')`;
} else if (option === 'wd') {
code = `(() => { const d = getDateObject(${value}).getDay(); return d === 0 ? 7 : d; })()`;
} else if (option === 'cw') {
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}))`;
} else if (option === 'custom') {
code = `formatDate(getDateObject(${value}), '${format}')`;
} else {
Expand Down
3 changes: 3 additions & 0 deletions admin/google-blockly/own/blocks_time.js
Expand Up @@ -314,6 +314,7 @@ Blockly.Blocks['time_get'] = {
[Blockly.Translate('time_get_wdt') , 'wdt'],
[Blockly.Translate('time_get_wdts') , 'wdts'],
[Blockly.Translate('time_get_wd') , 'wd'],
[Blockly.Translate('time_get_cw') , 'cw'],
[Blockly.Translate('time_get_custom') , 'custom'],
[Blockly.Translate('time_get_yyyy.mm.dd') , Blockly.Words['time_get_yyyy.mm.dd'] .format],
[Blockly.Translate('time_get_yyyy/mm/dd') , Blockly.Words['time_get_yyyy/mm/dd'] .format],
Expand Down Expand Up @@ -431,6 +432,8 @@ Blockly.JavaScript['time_get'] = function(block) {
code = `formatDate(new Date(), 'W', '${lang}')`;
} else if (option === 'wd') {
code = '(() => { const d = new Date().getDay(); return d === 0 ? 7 : d; })()';
} else if (option === 'cw') {
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())';
} else if (option === 'custom') {
code = `formatDate(new Date(), '${format}')`;
} else {
Expand Down
1 change: 1 addition & 0 deletions admin/google-blockly/own/blocks_words.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 6eb9278

Please sign in to comment.