Template:Date formatter

From stencil.wiki
Revision as of 23:55, 12 December 2024 by IssuePress (talk | contribs)


This formatting template compares two dates (start_date and end_date). If the dates are the same, it displays the single date; otherwise, it displays a range in the format "December 7, 2024 - December 9, 2024".

Usage

It is meant to be used with variables, like {{{start_date}}}:

{{Date comparison |<start-date>|<end-date>}}

Examples

The following examples use hard-coded dates, for examples sake.

{{Date comparison|2024/12/07|2024/12/07}}

Template:Date comparison

{{Date comparison |2024/12/07 |2024/12/09}}

Template:Date comparison