Issue with %ICUDateTime% years

Today these variables (maybe others) give a wrong year !!!!!! :

%ICUDateTimePlus%1%Sundays%YYMMdd% : 251229 !!! Must be 241229
%ICUDateTimePlus%3%Days%YYMMdd% : 251229 !!! Must be 241229

1 Like

The feature is working properly:

Do you see the difference? It's yy not YY for the year. Taken form the Formating Dates and Times ICU documentation:

Upper-case y is a week of year based calendars calculation, and shouldn't be used near year boundaries unless you know that the results may differ from what you expect.

-rob.

4 Likes

A very big thank you! Sorry for this rookie mistake! My Christmas Day saw too much good wine!

4 Likes

No problem; I've done the same myself, which is why I recognized it right away :). I think the Unix programmers drank too much wine when deciding that y and Y should have nearly identical functionality, except in critical ways around year end!

-rob.

5 Likes

griff da man :raised_hands:

Ah who could fault Y for trying to ring in yyyy+1 a little early

1 Like

See this thread from a few days ago:

If your dates for Dec 30 and 31 have the wrong year, this is Y - Tips & Tutorials - Keyboard Maestro Discourse

3 Likes