Module:Date period/doc

&#x3c;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikidata) --&#x3e;

Usage

 * For templates, you might want to use Date period instead.

&#x3c;code&#x3e;&#x3c;nowiki&#x3e;&#x3c;/code&#x3e;

Automatically formats two given dates with a space and and en dash. Dates can be of any format supported by Module:Date.

If the month is the same, it is only shown once. If the month and day is the same, it will not show a second part at all. If the year is different, it will show the year unless disabled.

The year can be forcefully shown with the &#x3c;code&#x3e;force-year&#x3c;/code&#x3e; parameter (third parameter of &#x3c;code&#x3e;p._main&#x3c;/code&#x3e;).

If one of the dates is invalid, the raw text will be displayed instead.

&#x3c;includeonly&#x3e;&#x3c;/includeonly&#x3e;