I feel this question is very general for all programmers on all languages. This is somewhat blurry. First, there are locales, which encapsulate cultural information and other stuff. I believe these locale objects also encapsulate information about date and time formatting, i.e. how to display a date, in Unicode Standard. Like so, for example: "yyyy-MM-dd'T'HH:mm:ssZ". Every country may have it's own date+time formatting rules, so we are all happy about locales, and users of our apps get date+time formatted to what is usual in their region.
But now, the really ugly part. There are calendars. Different calendars. The Gregorian like in the US and Europe and some other countries, but there are also Hebrew, Jewish and Muslim calendars and many more. Now, these calendars are of course different. They devide the time period of a year into units of different length, some may have 13 months, other may have just moon phases instead of Monday, Tuesday, Wednesday, and so on. I don't really know, but I know some of them appear very strange to someone who is used to the Gregorian calendar.
But the blurry thing now: Who does affect date+time formatting really? The locale? The calendar system? Both? And does the locale tell what calendar system to use, usually? How does the calendar system affect the locale and reverse?
I've been searching now almost the whole day on this topic, and it seems hard like a huge brick.