Module:Auto date formatter/doc
| This is a documentation subpage for Module:Auto date formatter. It may contain usage information, categories and other content that is not part of the original module page. |
| This module depends on the following other modules: |
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.