Date Format YYYY giving wrong year

Here’s a weird one. Suddenly, since 12/26/21, all my iOS Shortcuts that have a custom date format are giving the year for Current Date as 2022 instead of 2021. If I change the date format to use “yyyy” for the year instead of “YYYY”, then it correctly uses 2021. Anyone else having this issue?

Short answer: You should use yyyy in all your macros.

Longer answer: Keyboard Maestro uses ICU formatting for dates, and in that formatting scheme, Y is based on a “week of year” system in which years are divided into a whole number of weeks. Days near the beginning or of a conventional year are often put into the preceding or following year.

You are not the first person to get tripped up by this. Even though I know about this, I still sometimes use upper-case when I should use lower-case.

2 Likes

Thanks! Good to know, makes perfect sense. I was totally thinking this was a brand new thing, but I see the same thing happened to me at the end of last year and I didn’t notice until now.