Page MenuHomePhabricator

time values should be formatted in Wikitext output (and not just use the ISO-like representation)
Closed, InvalidPublic

Event Timeline

hoo created this task.Oct 24 2016, 8:14 PM
hoo added a comment.Oct 25 2016, 8:53 AM

AFAIR in the past we blocked similar efforts on being able to parse all dates we output (so that they could in theory be fed back to the repo).

@Lydia_Pintscher: Do we still need to block on this?

Izno added a subscriber: Izno.Oct 25 2016, 4:33 PM

There are likely some "local consensus" type issues with this one. E.g en.WP does not allow auto-formatted dates (which is what I assume is meant by "formatted in Wikitext output). I do not know if other wikis have done the same.

hoo added a comment.Oct 25 2016, 4:34 PM

E.g en.WP does not allow auto-formatted dates

In that case they are free to keep using the ISO-like representation.

Izno added a comment.Oct 25 2016, 4:39 PM

E.g en.WP does not allow auto-formatted dates

In that case they are free to keep using the ISO-like representation.

By which you mean, use {{#property}} rather than {{#statement}}?

hoo added a comment.Oct 25 2016, 4:40 PM

E.g en.WP does not allow auto-formatted dates

In that case they are free to keep using the ISO-like representation.

By which you mean, use {{#property}} rather than {{#statement}}?

For now, yes, I guess.

thiemowmde added a comment.EditedOct 26 2016, 8:41 AM

I'm sorry, @Izno, but what does "does not allow auto-formatted dates" mean? Showing "2016-12-31" to the reader does not make much sense. Dates must be formatted.

{{#statements|…}} is meant as a convenience feature that fits most needs, but never can fit all needs. If a community does not like the output it produces, they are free to stick to #property and apply their own formatting. Additionally, I hope we can add parameters to the #statements function that allow specifying other date formats and such.

@hoo, I'm tempted to close this ticket as invalid because both #property and #statements do not output "just the ISO-like representation" but formatted, localized strings, e.g. "2. Oktober 2015". So what is this ticket about? The description is empty.

@thiemowmde IIRC, #property does return the ISO style date. This was done to allow people to use existing formatting templates for dates. But I didn't double-check this now.

Izno added a comment.EditedOct 26 2016, 12:55 PM

I'm sorry, @Izno, but what does "does not allow auto-formatted dates" mean? Showing "2016-12-31" to the reader does not make much sense. Dates must be formatted.

en.WP had date auto-formatting disabled. This subsequently made its way into their manual of style at WP:DATELINK.

@hoo, I'm tempted to close this ticket as invalid because both #property and #statements do not output "just the ISO-like representation" but formatted, localized strings, e.g. "2. Oktober 2015". So what is this ticket about? The description is empty.

Go to https://en.wikipedia.org/w/index.php?title=Douglas_Adams&action=edit, paste {{#property:P570}} and click "Show preview".

I would gather that hoo wants to add links, which is the kind verboten on en.WP (and which makes an assumption about the location of years articles, recently a bad assumption).

That said, if {{#property}} is already doing the piece of it which is not the linking as you suggest, then I don't see a community problem--someone would have been bugged otherwise, I guess.

Thanks a lot for the links, @Izno, this clarifies things a lot. Short version: This is mostly unrelated to what we are talking about in this ticket. The "date auto-formatting" discussed there was a MediaWiki feature that was removed a long time ago, see https://www.mediawiki.org/wiki/Manual:$wgUseDynamicDates. The only thing we must consider is that we should not link dates (e.g. [[1 April]] [[2008]]). We never had plans to do this.

hoo closed this task as Invalid.Nov 8 2016, 9:53 AM

Seems I got confused here because of the test case I chose in DataAccessSnakFormatterOutputFormatTest. Never mind this, the output seems fine to me.

I've taken care of the "weird" test case in https://gerrit.wikimedia.org/r/320354/.