Module:Parsedate/doc

< Module:Parsedate
Revision as of 05:17, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Parsedate

Template:Module rating

The module “Parsedate” contains one available calls that will accept an input string and return a string that:

  • for a valid date, wraps a hidden copy of the date in ISO format in a microformat
  • returns the input.

Usage

{{#invoke:Parsedate|parse_date|input_string}}

Parameters

  • Positional parameter – the value of frame.args[1] is passed after function name and vertical bar and is the string to be parsed for a valid date.

Examples

{{#invoke: Parsedate | parse_date | 28 August 2013}}

will produce  (2013-08-28)28 August 2013 - inspect the html to see the microformat.

There are several test cases at User:RexxS/DateDataTest which use extra code to illustrate the parsing.