问题
I've often standardized on YYYY-MM-DD
as the date format for communicating within a geographically distributed project teams to dispel any ambiguity that might arise from local date formats.
Is it likely that I might run into people who are used to seeing dates as YYYY-DD-MM
? Are there programs that use this as a date format?
回答1:
See "Calendar date" on Wikipedia on the topic - it lists the countries by date/time format.
At first glance it doesn't look like anyone is using YYYY-DD-MM
regularly.
回答2:
According to Wikipedia Kazakhstan may use YYYY.DD.MM
. I can't read the source for this information, so I don't know the specifics.
See: https://en.wikipedia.org/wiki/Date_format_by_country
That aside, I do believe that the delimiter still makes it visibly different from YYYY-MM-DD
, so there should be no issue.
Example: 2017-01-13
vs 2017.13.01
As also mentioned by @Tracker1 and @DaveE, YYYY-MM-DD
is the ISO-8601 standard format.
回答3:
yyyy-mm-dd
in particular is a subset of the ISO-8601 format.
There is no recognised standard that uses year date month
. When year
is first, it should always be followed by an appropriate sub-year, be that quarter, month, julian day, etc.
Some advantages to using year-first is that the order also happens to work well for alpha-sorting when used as a text value (such as part of a file name).
回答4:
You should try to get your team(s) to standardize on ISO 8601 formatting, or use it and tell everyone that's what you're using. Or see Wikipedia's ISO 8601 reference.
回答5:
There are none in the list of cultures in Windows that default to YYYY-DD-MM, so I would say you are pretty safe, in general, however since you can customize the dates, you should probably support it, if you want to be sure.
来源:https://stackoverflow.com/questions/2254014/are-there-locales-or-common-programs-that-use-yyyy-dd-mm-as-the-date-format