Page MenuHomePhabricator

Would it be possible for the cite templates in VE to use the date format specified in the article for date parameters?
Closed, DeclinedPublic


Many of the citation templates on the English Wikipedia have date and access date parameters. Quite a few articles also have templates like {{use dmy dates}}. As evident by the references section on many articles, multiple date formats are used in every article. Would it be possible for VisualEditor to automatically format the date based on the date format template?

Event Timeline

JEumerus added a subscriber: JEumerus.

I presume that VisualEditor does not necessarily know about which format to use.

@Daylen: Can you please provide an example link and specific examples? Otherwise this all stays very abstract. Thanks.

My understanding is that {{use dmy dates}} it's a instruction for how to render the dates, not how they are inputted.

My understanding is that {{use dmy dates}} it's a instruction for how to render the dates, not how they are inputted.

These templates have no control over how the dates are rendered (however, that would fix the problem too), they only show the template name to the editor. Although on enwiki bots do go through and make the dates consistent, it would be much better if this was automatically done as new referances are being added, either automatically or by a little note that reminds a user when the TemplateData of a form parameter is set to date about the preferred format on this article.

The three most common date formats are:

  • dmy (28 September 2018)
  • mdy (September 28, 2018)
  • ymd (2018-09-28)

The current problem is that I doubt any new editor would understand what this means.

2018-09-28_2152.png (748×1 px, 315 KB)

The CS1 templates (on en.WP at least) have a df= parameter that Citoid could set based on the "Use XXX dates" template that is present in the article. That way, any supported date format could be entered into the cite template's date fields, and the df= parameter would format the dates correctly.

JTannerWMF added subscribers: ppelberg, Mvolz, JTannerWMF.

This may have been fixed, we will discuss to see if it was or if we need to loop in @Mvolz

CC: @Esanders @ppelberg

@marcella will follow up on this ticket with @Mvolz to determine the proper status.

The cs1 module on en wiki recently changed to sniff these templates in the page. This is a better approach than doing it from inside ve anyway :).