Jump to content

Module:Auto date formatter/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Trappist the monk (talk | contribs) at 15:15, 29 March 2025 (create;). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This module allows non-cs1|2 templates and templates that do not wrap cs1|2 templates to have automatic date formatting according to an article's {{use dmy dates}} or {{use mdy dates}} template. This module obeys date style (long, abbreviated, year initial) specified by the |cs1-dates= parameter. See Template:Use dmy dates § Auto-formatting citation template dates for additional information about |cs1-dates=.

Usage

For publication dates:

{{#invoke:auto date formatter|pub_date_format|<date>}}

For access and archive dates:

{{#invoke:auto date formatter|access_archive_format|<date>}}

When this module is used in a template that is itself in an article that has either {{use dmy dates}} or {{use mdy dates}}, the above functions return <date> in the format specified by the {{use xxx dates}} template in the style specified by |cs1-dates= if present. When the article does not have a {{use xxx dates}} template, this module returns <date> as is.

This module uses Module:Citation/CS1/Configuration to determine the format and style to apply to dates.