Page MenuHomePhabricator

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

Event Timeline

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?

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.

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

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

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}}?

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.

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.

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.

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/.