Module:Dates/locales/doc

From OpenStreetMap Wiki
Jump to navigation Jump to search

This table maps ISO language code or IETF language tags to date and date range formats used by {{Event date}} (via Module:Dates). The formats in this module are loosely based on CLDR, specifically the sections “medium”, “MMMd/d”, “MMMd/M”, and “yMMMd/y”.

Structure

A format date contains four keys:

  • sameDay – for when something lasts only one day
  • sameMonth – for when something lasts multiple days within the same month
  • sameYear – for when something ends in a different month than it started
  • different – for when something ends in a different year than it started

Each key is set to a table containing one or two format strings. The first string determines the return value’s overall format. If specified, the second string formats the end date, which is then inserted into the main formatted string, replacing the placeholder.

The format string syntax (other than the placeholder) is described in the ParserFunctions extension's documentation.

See also