Page MenuHomePhabricator

wikisource: improve date display on first page [placeholder]
Open, Needs TriagePublic

Description

Background: different languages/culture display the date in different order. for this reason, some users may be confused. for example, does "5" refer to the date or the month? for this reason, we can fix the issue by having the name of the month displayed.

Acceptance Criteria:

  • Investigate how to improve date display on first page, such as:
    • Display month first instead of day
    • Use the IntlDateFormatter class to fix this problem
  • If possible, implement a fix

Event Timeline

ifried created this task.Jul 2 2020, 3:32 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 2 2020, 3:32 PM
Tpt added a subscriber: Tpt.Jul 14 2020, 10:37 AM

The PHP Intl extension is now much more common than it was in 2012. It might be relevant to use here the IntlDateFormatter class that allows to easily fix this problem.

The date is currently shown using the %x format of PHP's strftime() function, which means it uses the "preferred date representation based on locale, without the time (Example: 02/05/09 for February 5, 2009)" – so in one way, it shouldn't be confusing (but of course it is, because it's not obvious that it's in the locale's format).

It isn't hard to change it to something like %e %B %Y (month number, month name, year; where %B is the full month name, based on the locale). It'll then be the same format for all locales.

Oh, ignore me; I see what you mean @Tpt! :-) Like this? https://github.com/wsexport/tool/pull/242

Tpt added a comment.Jul 16 2020, 8:21 AM

@Samwilson Yes, it's exactly what I mean. This way, we don't need to install all locales in the Wsexport servers.

ifried renamed this task from wikisource: display month name rather than number on the 1st page [placeholder] to wikisource: improve date display on first page [placeholder].Jul 17 2020, 10:45 PM
ifried updated the task description. (Show Details)

Thanks, @Tpt! I have added your suggestion into the acceptance criteria of the ticket.