User talk:Omegatron/Date formatting

Latest comment: 16 years ago by LeadSongDog in topic Good idea

Day-month

edit

Is there a way to express "September 1860" so it can be formatted also as "1860 September"? 1860-09 is the standard, but doesn't fit the pattern and is more likely to conflict with other things. "1860-09-00"? "1860-09-??"?

Is there a way to express "September 11" so that it can be autoformatted as "11 September"? "09-11" is ambiguous. "09-11T"?

Borrowing from an older version of ISO, a month-day could be expressed as --09-11, where the year is replaced by a dash, removing the ambiguity. −Woodstone (talk) 09:49, 9 January 2008 (UTC)Reply
Excellent. But it's been removed from later versions? — Omegatron 15:03, 10 January 2008 (UTC)Reply
Yes, the current version does not have this anymore. The closest I can get to a month/day only in the current standard would be R/00000911/P1Y, meaning indefinite repetion of a period of one year starting from September 11 in year zero. Completely unacceptable in the context here. −Woodstone (talk) 15:52, 10 January 2008 (UTC)Reply
Yes. And the current software handles 11 September, doesn't it? Hmmph. It certainly doesn't format 09-11, though.
-09-11 --09-11 0000-09-11 -----09-11 ????-09-11
The whole notion of interpreting ISO dates as code depends on "YYYY-MM-DD" being uncommon in plain text. 09/11 is not as easy. — Omegatron 17:29, 10 January 2008 (UTC)Reply
So using --09-11 is still a good form. Fits well with 2008-09-11, quite intuitive, can hardly occur with another meaning. −Woodstone (talk) 17:55, 10 January 2008 (UTC)Reply
I suppose. It makes it look a little more cryptic than I was hoping. Will be harder to sell.  :) Do people regularly link things like "August 25"? — Omegatron 20:10, 10 January 2008 (UTC)Reply
The style guide discourages to link incomplete dates. It is usually only linked if it really has special meaning. In that case there would hopefully often be a preferred format. The converter could ignore dates inside links (opposite to what happens now). −Woodstone (talk) 20:24, 10 January 2008 (UTC)Reply
But is that because of the auto-localization or the hatred of excessive linking? — Omegatron 03:20, 11 January 2008 (UTC)Reply

Good idea

edit

Looks good ... not sure where you get the idea the am/pm is uncommon outside of the US. Do you have anything in mind for getting abbreviated month names (useful in tables), e.g. 9 Jan? However, wouldn't there be a question as to what to make the defaults? Jɪmp 06:20, 9 January 2008 (UTC)Reply

Agree that this is an excellent idea. So simple. Default setting needs attention. I can see as options:

  1. no conversion (keep ISO)
  2. use the "regional settings" of the user's operating system
  3. use a cookie for not logged-in readers
  4. use the existing preferences for logged-in users

Woodstone (talk) 08:32, 9 January 2008 (UTC)Reply

  • I wouldn't think that the first option is viable. Most visitors will not have accounts so would be faced with a very un-English looking text.
  • The second option might work but pushes the issue to a new level: which region gets what?
  • Option 3: I s'pose you mean a kind of way to remember your prefs even when unlogged in. That'd be good if possible. Of course, it only works for those with prefs.
  • The fourth option, I'd take as a given. The question is what to do for the un-logged-in.
Jɪmp 08:45, 9 January 2008 (UTC)Reply
Indeed, the concern is mostly for occasional readers, without user name. With regional setting in option 2, I mean the date/time settings in MS-Window's control panel at "regional and language options" (but how about Mac an linux?), containing actual formatting strings. No need to guess at named regions. I envisage the original default to be ISO, with a pop-up that allows to set preferences in a cookie, that will be reused forever for the same computer/user. −Woodstone (talk) 09:43, 9 January 2008 (UTC)Reply

I suggested regional defaults based on IP location, but the developers said it's not feasible.

Does the browser send information about this, though? That would be easier and better than an IP lookup.

A cookie is also a great idea, or a URL bit like "&dateformat=american"?

Instead of having it generated by the servers, though, we could also send the dates in ISO format with a class around them, and let the user's browsers do the date formatting with javascript. Then there are no server caching issues. (And users without javascript would still see the dates; just in ISO format. They can still log in.) — Omegatron 15:09, 10 January 2008 (UTC)Reply


Aha. We can guess based on the language requested by the browser: FAQ: Accept-Language used for locale setting. Much better than guessing based on IP.

Date formatting is, essentially, an aspect of language, so we're actually more correct here than if we were trying to use the language header for actual geo-location purposes. — Omegatron 15:23, 10 January 2008 (UTC)Reply

Ah ... But you are getting the local language (perhaps not English) of the user's PC to set a date format in an English text. That would not be appropriate. And is US-E a different language than UK-E on that level? Furthermore, depending on context different formats may be required. Like ISO in a table, and textual month in running text. Better start with a default (=ISO?) and let the user choose (even if not logged in). −Woodstone (talk) 15:43, 10 January 2008 (UTC)Reply
If the intended output format is always ISO (like in a table), you use nowiki tags, as explained on this page.
Rough draft of country-to-format mappings hereOmegatron 16:01, 10 January 2008 (UTC)Reply
It would make me unhappy. For all kinds of practical reasons unrelated to wikipedia, I have my settings at en-us. I override in that profile the date formats and unit choices. So, while my normal practice satisfies me, the proposed solution would not work for me. You must have noticed that Windows is very US centered. Many things don't work well in other language settings. Try to type a quote with US-international for example. −Woodstone (talk) 16:31, 10 January 2008 (UTC)Reply
So you've gone out of your way to make your browser request American English, and you are unhappy when websites gave it American English? — Omegatron 16:47, 10 January 2008 (UTC)Reply
When one buys a PC, the default setting is always everything US style. My guess is that less than 5% of the people are aware of facilities to change this and even fewer use them. If you do change the settings, some things break down. For example in MS Word, the indent for a bullet is hard coded to be 1/4 inch. If you set units to cm and tabs at 0.5 cm, that layout in bullet lists is horrible. In MS powerpoint the grid is at 0.1 inch. If you switch to metric it becomes 2 mm, but internally it is rounded to the closest multiple of 0.1 inch. Again horrible alignment. Sorry for venting my annoyance on you as completely innocent party. The switch for language or locale is just too big. It influences too many things, some of which are unacceptable. −Woodstone (talk) 18:20, 10 January 2008 (UTC)Reply


Oh, c'mon. This is way too much of a big deal over nothing. People aren't going to spontaneously combust if we give them "15 January" when they're used to writing "January 15". It's a lot less of a big deal than margins. The world is not going to end. We should guess what the user wants, if we can do so easily, but then just leave it at that. We'd be doing much more than any other website does to cater to them, and they can always log in and override it.

I get a little annoyed when I visit a website that absolutely refuses (I've asked) to format dates in any format other than "DD/MM/YY" (which we already prohibit in favor of written-out words), but I'm not dying because of it.

Yet people are all concerned over purely aesthetic swapping of an otherwise unambiguous month name and date. The wiki has much worse problems. — Omegatron 20:25, 10 January 2008 (UTC)Reply


I am sure there are statistics for the amount of people who use "en-us", too. I can't seem to find any though.

[1]

Omegatron 20:56, 10 January 2008 (UTC)Reply

Congratulations on producing such a well-reasoned proposal. I might add the following observation:

  • You successfully de-conflate the linking of dates from the autoformatting.
  • You choose markup which will minimize the difficulty of internationalization and translation.
  • The temptation to choose rendering language and formats on geolocation is ill-considered, as there are minority languages nearly everywhere. Use a cookie or browser settings for the IPUsers so they can still set their preferences.
  • The vast majority of dates in GA or better articles are in the citations, external links, etc. In these areas the only dates you don't want autoformated are in citation title= strings or inside quotations marks. Further, you never want to wikilink dates in these areas.
  • Quotation marks or cquotes should always defeat autoformatting of dates in the enclosed text.
  • The discussion at MOSNUM grossly underestimates the general reader's ability to understand ISO dates. After all the Y2K rigamarole there are few computer users anywhere who are oblivious to them.

Thank you for your efforts.LeadSongDog (talk) 20:58, 24 January 2008 (UTC)Reply

th

edit

Looks good; thanks very much. But can you remove the "th" from your US examples? It's proscribed by MOS. Tony (talk) 11:10, 14 January 2008 (UTC)Reply

You mean the ones in the direct quote?  :) Those are the only ones I see. If there are others, you can remove them yourself. — Omegatron 14:35, 15 January 2008 (UTC)Reply