Page 1 of 1

Difference Between YYYY and yyyy

Posted: Sat Jan 18, 2025 6:28 am
by ishanijerin1
It seems there are other people who are similarly addicted to it...

They seem to be completely different things to begin with, and roughly speaking it seems to be like this.

YYYY: The week year, which is the year to which the date belongs.
yyyy : The calendar year to which the date san marino email address belongs (the usual way of expressing years)
Week-year: Determined by ISO8601. The first day of the week is Monday. It is defined as "the week that contains the first Thursday in a year is the first week of that year."
I see. I kind of get it, but I'm not sure... In other words, if the date is in the last week of December excluding Sundays and is in the same week as the first week of January the following year, it will be part of the following year... Is that right?

View the last week of December in calendar view
It's hard to get a sense of it just by looking at the text, so let's look at the end-of-year periods of 2024, 2025, and 2026 in the calendar display of SwiftUI's DatePicker. To make it easier to understand, I've enclosed the period of the last week of December in a red frame.