Parameters ของ แม่แบบ:Dts

Date display can be modified using two named parameters.
  • To use international date formats, use the format=dmy parameter.
  • To turn off the suppression of word wraps, use the nowrap=off parameter.
The year, month and day can either be entered separately or as a single date.
{{dts|year|month|day|BC}}{{dts|date}}
  • 1st parameter – Year (optional if month is given)
    • Year number – number in the range -9999 through 9999: the numbers -9999 through 0 are used without "bc" and represent astronomical years -9999 through 0, the numbers 1 through 9999 represent that year AD, or BC with the fourth parameter set to bc or BC
  • 2nd parameter – Month (optional if the day is not given either)
    • Full month name – February or february
    • Abbreviated month name – Feb or feb
    • Month number – 2 or 02
  • 3rd parameter – Day (optional)
    • Day number – 7 or 07
  • 4th parameter – optional with value BC or bc
    • Used with a positive year number

Thus e.g. for the year 5 BC we can use "5|bc" or "-4".

A time period (year or month and year) is sorted according to its start, and time periods with the same starting moment are in order of descending length: a year comes before its first month; a month comes before its first day.

  • 1st parameter – the full date in international, US or ISO format
    • It uses {{#time:}} and so is limited to what the parser function can handle (e.g. it won't go beyond 100 AD).
    • International format is left as it is. ISO format defaults to US format.
    • Abbreviated months are accepted.
    • Capitilisation and comma mistakes are corrected.

Input

{{dts|year|month|day|BC}}

  • {{dts|1776|July|4}}

{{dts|date}}

  • {{dts|1776-07-04}}
  • {{dts|July 4, 1776}}
  • {{dts|4 July 1776}}

Also see the examples below.

Output

Output sent to table

  • <span style="display:none">01776-07-04</span> July 4, 1776 or
  • <span style="display:none">01776-07-04</span> 4 July 1776

Output displayed to user

  • July 4, 1776 or
  • 4 July 1776