diff --git a/src/AttributeUi/AttributeUi.css b/src/AttributeUi/AttributeUi.css index 13e1d9a..d361ebe 100644 --- a/src/AttributeUi/AttributeUi.css +++ b/src/AttributeUi/AttributeUi.css @@ -267,6 +267,7 @@ main.layout:has( .workarea > .pivotTableUiContainer[aria-busy=true] ) > nav#side /* calendar */ content: "\ea53"; } + details[data-nodetype=derived][data-derivation=iso-year] > summary > span.label::before, details[data-nodetype=derived][data-derivation=year] > summary > span.label::before { /* letter-y */ content: "\ec68"; @@ -301,6 +302,7 @@ main.layout:has( .workarea > .pivotTableUiContainer[aria-busy=true] ) > nav#side details[data-nodetype=derived][data-derivation="day of week shortname"] > summary > span.label::before, details[data-nodetype=derived][data-derivation="day of week name"] > summary > span.label::before, + details[data-nodetype=derived][data-derivation="iso-day of week"] > summary > span.label::before, details[data-nodetype=derived][data-derivation="day of week num"] > summary > span.label::before { /* letter-d-small */ content: "\fcca"; diff --git a/src/AttributeUi/AttributeUi.js b/src/AttributeUi/AttributeUi.js index c44da9b..db74918 100644 --- a/src/AttributeUi/AttributeUi.js +++ b/src/AttributeUi/AttributeUi.js @@ -232,6 +232,14 @@ class AttributeUi { return fallbackFormatter; } }, + 'iso-year': { + folder: 'date fields', + expressionTemplate: "CAST( ISOYEAR( ${columnExpression} ) AS INT)", + columnType: 'INTEGER', + createFormatter: function(){ + return fallbackFormatter; + } + }, 'quarter': { folder: 'date fields', expressionTemplate: "'Q' || QUARTER( ${columnExpression} )", @@ -287,6 +295,11 @@ class AttributeUi { expressionTemplate: "CAST( DAYOFWEEK( ${columnExpression} ) as UTINYINT)", columnType: 'UTINYINT', }, + 'iso-day of week': { + folder: 'date fields', + expressionTemplate: "CAST( ISODOW( ${columnExpression} ) as UTINYINT)", + columnType: 'UTINYINT', + }, 'day of week name': { folder: 'date fields', expressionTemplate: "CAST( DAYOFWEEK( ${columnExpression} ) as UTINYINT)", diff --git a/src/QueryUi/QueryUi.css b/src/QueryUi/QueryUi.css index 3f1b842..d153481 100644 --- a/src/QueryUi/QueryUi.css +++ b/src/QueryUi/QueryUi.css @@ -206,6 +206,7 @@ body > main:has( > menu[role=toolbar] > #currentDatasource:empty ) > #workarea > content: "\ea53"; } + > li[data-derivation=iso-year] > span:before, > li[data-derivation=year] > span:before { /* letter-y */ content: "\ec68"; @@ -239,6 +240,7 @@ body > main:has( > menu[role=toolbar] > #currentDatasource:empty ) > #workarea > > li[data-derivation="day of week shortname"] > span:before, > li[data-derivation="day of week name"] > span:before, + > li[data-derivation="iso-day of week"] > span:before, > li[data-derivation="day of week num"] > span:before { /* letter-d-small */ content: "\fcca";