(If you download the macro, it will be in a group named “Temporary” and will be enabled.)
The key is to figure out how many days there are until the next Monday. To do that, calculate 2 - DOW() (Monday is Day of Week 2 in Keyboard Maestro) and add 7 if the result is less than or equal to 0. You then add 6 to that number to get the Sunday after the next Monday.
Once you have that worked out, it’s just a tedious set of calls to the %ICUDateTimePlus% token with different formatting codes:
The single quote marks in the first token are a way of “escaping” the text inside so it doesn’t get interpreted as a formatting string.
Now for the caveats:
I’m in the US, so my month name comes out as “February.” If your computer is set up with a German locale, I think it should come out as “Februar,” but I don’t have a way of testing that.
You may need to think more about your formatting string. It’s fine to say “7.–13. Februar 2022” when the entire week is within a single month, but what if the week starts in one month and ends in another? Is “28.–6. März 2022” really what you want? The same thing can happen when a week starts in one year and ends in the next.
If the “KW” part can change, you'll have to update the logic to allow for different suffixes.
I doubt my macro will be everything you need, but it should get you started on the right path.
Thank you very much for your outstandig effort. I try to wrap my mind around it and adapt it to my needs. These %ICUDateTimePlus% tokens can be confusing at times.