This seems like it should be a very common situation, but I cannot seem to find a standard function in Dates to return the ISO 8601 Year and Week in Julia? The week number is correct, but It doesn’t seem to return the correct year.
in SQL, the date format would be ‘IYYY-IW’ which would return 2025-01 for Dec 31, 2024.
Is there a formatting code that I am missing from the documentation for the ISO8601 Year?
This seems like an omission in the Dates module. The ISO 8601 specifier for week number appears to be Www, but this is not supported by Dates.
There is a week function, so you can do Dates.week(now()), which does indeed return the ISO 8601 week number, but no built-in format string. You can write a custom function based on this, though.