Template:Date difference/doc

From NPOWiki
Revision as of 07:53, 1 October 2020 by Bobogoobo (talk | contribs) (create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page contains the documentation for Template:Date difference. It includes information about the template, such as usage and categories, and is not displayed when using the template itself.

This template is used to calculate the number of days between two given dates, or one date and the current date. (More features can be added as needed.)

Use the "formatnum" magic word to add thousands separators when desired.

Parameters

  • first unnamed parameter: the start date.
  • second unnamed parameter: (optional) the end date; defaults to the current date.

Each parameter must be in one of the following formats in order for the software to recognize the date unambiguously:

  • January 31, 2020
  • 31 January 2020
  • 2020-01-31

Examples

  • {{date difference|January 27, 2006}} produces: 6665
  • {{formatnum:{{date difference|January 27, 2006}}}} produces: 6,665
  • {{date difference|August 31, 2015|November 17, 2016}} produces: 444