Page MenuHomePhabricator

Make module with extended mw.language:formatDate functions
Open, Needs TriagePublic

Description

there is a request for some functions not supported by the standard method:

  • ISO 8601 compliant (at first only partially)
  • incomplete dates (no year or no day) compliant
  • generation of errors in case of incorrect input (with support for service categories)
  • parsing incoming short text dates of different formats in different languages done for [ru; en; de; fr] / [yyy*mm*dd; dd*mm*yyy; mm*yyy; yyy*mm; d mmm yyy; mmm d, yyy; mmm yyy]
  • handling negative dates (BC) without year zero (both input and output)
  • date conversion to digital formats (JD, lua os.date Unix time) and other calendars (groundwork for the future)
  • getting a formatting string (& some parameters?) and converting the date by it: done for standart lang:formatDate
    • optional automated wiki links to dates and years
    • optional hiding duplicate months and years (for templates for displaying Gregorian and Julian dates)

input

  • Date text
  • (optional) Format string - YYYY-MM-DD if not specified
  • (optional) Parameter table

output

  • Formatted date text
  • Date table (with fields day/month/year/JD/etc)
  • Status table (with fields indicating whether it was possible to extract a full or incomplete date and errorText и errorCat in case of errors)

implementing at Module:Calendar#BoxDate