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

Description

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

Daylen created this task.Sep 28 2018, 3:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 28 2018, 3:46 AM
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.

Daylen added a comment.EditedSep 29 2018, 4:27 AM

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.

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

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 7 2019, 3:57 PM

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

Mvolz closed this task as Declined.May 8 2019, 5:24 PM
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptMay 8 2019, 5:24 PM
Mvolz added a comment.May 8 2019, 5:25 PM

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 :).