Jump to content
Wikipedia The Free Encyclopedia

Template:Start date: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 1: Line 1:
<includeonly>{{#invoke:Date time|generate_date}}<!-- Tracking categories
<includeonly>{{#ifeq: {{#invoke:String2|isInteger|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|empty=yes}} | false | {{error|not a number value}} <small>[[:Template:Start date|(help)]]</small> {{main other|[[Category:Pages using start date with invalid values]]}} | {{#if: {{{4|}}}
-->{{#invoke:Check for unknown parameters|check|unknown={{(追記) Main (追記ここまで) other|[[Category:Pages using start date with unknown parameters|_VALUE_]]}}|preview=Page using [[Template:Start date]] with unknown parameter "_VALUE_"|showblankpositional=1| 1 | 2 | 3 | 4 | 5 | 6 | 7 | df }}</includeonly><noinclude>
|{{#if: {{{5|}}}
|{{padleft:{{{4}}}|2|0}}:{{padleft:{{{5}}}|2|0}}{{#if: {{{6|}}}
|&#58;{{padleft:{{{6}}}|2|0}} }},&#32;}} }}<!--ABOVE FOR TIME; BELOW FOR DATE
-->{{#if: {{{1|}}}
|{{#if: {{{2|}}}
|{{#if: {{{3|}}}
|{{#if: {{{df|}}}|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}|{{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},}}&nbsp;{{trim|{{{1}}}}}|{{MONTHNAME|{{{2}}}}}&nbsp;{{trim|{{{1}}}}}}}|{{trim|{{{1}}}}}}}}}{{#if: {{{7|}}}
|&#32;({{#ifeq: {{{7}}}|Z|UTC|{{{7}}}}})}}<!-- BELOW FOR hCalendar
--><span style="display:none">&#160;(<span class="bday dtstart published updated itvstart">{{#if: {{{1|}}}
| {{trim|{{{1}}}}}{{#if: {{{2|}}}
| -{{padleft:{{{2}}}|2|0}}{{#if: {{{3|}}}
| -{{padleft:{{{3}}}|2|0}} }} }}<!--
-->{{#if: {{{4|}}}
| T{{padleft:{{{4}}}|2|0}}{{#if: {{{5|}}}
| &#58;{{padleft:{{{5}}}|2|0}}{{#if: {{{6|}}}
| &#58;{{padleft:{{{6}}}|2|0}} }} }} }} }}{{{7|}}}</span>)</span>}}<!-- Tracking categories
-->{{#invoke:Check for unknown parameters|check|unknown={{(削除) main (削除ここまで) other|[[Category:Pages using start date with unknown parameters|_VALUE_]]}}|preview=Page using [[Template:Start date]] with unknown parameter "_VALUE_"|showblankpositional=1| 1 | 2 | 3 | 4 | 5 | 6 | 7 | df }}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 11:01, 10 March 2025

Template documentation[view] [edit] [history] [purge]
Warning This template is used on approximately 503,000 pages, or roughly 1% of all pages .
To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see Wikipedia:COinS.

{{Start date }} returns the date (or date and time) that an event or entity started or was created, in a standard format. It also includes a hidden (by CSS) duplicate, machine-readable date (or date and time) in the ISO date format, for use inside templates or table rows that emit microformats. It should be used only once in each such template and never used outside such templates. The hidden date degrades gracefully when CSS is not available.

When not to use this template

Do not use this template for:

  • Dates that are uncertain, e.g., "before 4 April 1933", "around 18 November 1939", "19??".
  • Date ranges, e.g. "c. 1690–1712"
  • Dates outside the range given under "Limitation", below.
  • Other, secondary dates
  • Outside microformat-emitting templates or table rows; if in doubt, see the parent template's documentation
  • More than one date
  • Dates displayed using AM/PM format; this template only outputs 24-hour times
  • Dates that are not calendar dates, e.g. "12th century" or "present" or "TBA"

In the above situations, omit the template entirely, using untemplated text.

Usage

Parameters

  • The unnamed parameters, in order, represent the year (four digits; required parameter), month (one or two digits), day (one or two digits), hour in 24-hour time (one or two digits), minutes (one or two digits), seconds (one or two digits), and the time zone (see below).
  • When specifying time of day, MM (minutes), SS (seconds), and the time zone are optional
  • Time zone may be a numerical value, or Z for UTC (see examples)
  • |df=yes, an optional parameter, can be set to display the day before the month (e.g. "7 November 2004" instead of the default "November 7, 2004"). The order of parameters does not change (it remains YMD). This is primarily used in articles using DMY format for dates.

Examples

  • {{Start date|1993}} → 1993 (1993)
  • {{Start date|1993|02}} → February 1993 (1993-02)
  • {{Start date|1993|02|24}} → February 24, 1993 (1993年02月24日)
  • {{Start date|1993|02|24|08|30}} → 08:30, February 24, 1993 (1993年02月24日T08:30:00)
  • {{Start date|1993|02|24|08|7=+01:00}} → 08:00, February 24, 1993 (+01:00) (1993年02月24日T08:00:00+01:00)
  • {{Start date|1993|02|24|08|7=−07:00}} → 08:00, February 24, 1993 (−07:00) (1993年02月24日T08:00:00−07:00)
  • {{Start date|1993|02|24|08|30|23}} → 08:30:23, February 24, 1993 (1993年02月24日T08:30:23)
  • {{Start date|1993|02|24|08|30|23|Z}} → 08:30:23, February 24, 1993 (UTC) (1993年02月24日T08:30:23Z)
  • {{Start date|1993|02|24|08|30|23|+01:00}} → 08:30:23, February 24, 1993 (+01:00) (1993年02月24日T08:30:23+01:00)
  • {{Start date|1993|02|24|08|30|23|−07:00}} → 08:30:23, February 24, 1993 (−07:00) (1993年02月24日T08:30:23−07:00)
  • {{Start date|1993|02|24|df=y}} → 24 February 1993 (1993年02月24日)
  • {{Start date|1993|02|24|08|30|df=yes}} → 08:30, 24 February 1993 (1993年02月24日T08:30:00)

Notes

Place any additional non-numeric text outside of the template:

  • c. {{Start date|1900}} → c. 1900 (1900)
  • {{Start date|1993|02|24}}, no later than 15:00 UTC → February 24, 1993 (1993年02月24日), no later than 15:00 UTC

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Start date in articles based on its TemplateData.

TemplateData for Start date

Date that an event or entity started or was created

Template parameters[Edit template data ]

ParameterDescriptionTypeStatus
YYYY1

Start year

Numberrequired
MM2

Start month

Numbersuggested
DD3

Start day of month

Numbersuggested
HH4

Start hours

Numberoptional
MM5

Start minutes

Default
0
Numberoptional
SS6

Start seconds

Default
0
Numberoptional
TZ7

Time zone offset, "+02:00", "-06:00" or "Z" for UTC

Lineoptional
Day firstdf

Set to 'yes' to show the day before the month name

Suggested values
yes y
Default
false
Lineoptional

Use in microformats

This template also returns the date, hidden by CSS, in the ISO 8601 format needed by one or more of the following microformats:

usually, but not always, within infobox or similar templates, or tables.

Its use in hCard is for organizations, venues and similar; use {{Birth date }} or {{Birth date and age }} for people.

Similarly, {{End date }} returns the date as hCalendar's (class="dtend").

See the microformats project for further details.

Limitation

This template has no provision to deal with a date in a non-Gregorian calendar. Also, ISO 8601 requires mutual agreement among those exchanging information before using years outside the range 1583–9999 CE. Therefore, use of this template for non-Gregorian dates or dates outside that range constitutes a false claim of conformance to the ISO 8601 standard.

Any editor encountering such usage should change the date to plain text with no template; or if not confident in doing so, raise the matter on this template's talk page.

Examples with hidden output

  • {{Start date|2016|12|31}} → December 31, 2016 (2016年12月31日)
    December&nbsp;31,&nbsp;2016<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">2016年12月31日</span>)</span>


  • {{Start date|2016|12|31|08|30|23|+01:00}} → 08:30:23, December 31, 2016 (+01:00) (2016年12月31日T08:30:23+01:00)
    08:30:23,&#32;December&nbsp;31,&nbsp;2016&#32;(+01:00)<span style="display: none;">&nbsp;(<span class="bday dtstart published updated itvstart">2016年12月31日T08:30:23+01:00</span>)</span>

Tracking categories

See also

Birth, death and age templates
birth, death, age
Combined BDA template  Description / use 
{{BirthDeathAge }} Combines functions of {{Birth date}}, {{birth-date}}, {{birth date and age}}, {{birth year and age}}, {{death date}}, {{death-date}}, {{death date and age}}, and {{death year and age}}.
Birth templates  Description / use 
{{Birth date }} To display a birth date and related hidden metadata.
{{Birth-date }}
{{Birth date and age }} {{Birth date}} with suffix '(age N)'.
{{Birth date and age2 }} {{Birth date and age}} plus age as of a specified date.
{{Birth-date and age }} As {{Birth date and age}}, but accepts dates in text form ('15 June 1950', 'June 15, 1950', 'June 1950', etc.).
{{Birth date and age in years and days }} {{Birth date and age}}, but with the age displayed in years and days rather than just years.
{{Birth year and age }} Year of birth and approximate age.
{{Birth based on age as of date }} To display approximate birth year and current age given a particular date (e.g. when a dated reference mentions the age of a person), only works for living people.
{{Birth based on age as of dates }} To display approximate birth year and current age given several particular dates (e.g. when a dated reference mentions the age of a person), only works for living people.
{{Birth based on age at death }} To display approximate birth year based on age at death, or on age at a specific date if death date isn't known.
Death templates  Description / use 
{{Death date }} To display a death date and related hidden metadata.
{{Death-date }}
{{Death date and age }} {{Death date}} with suffix '(aged N)'; also called with {{event date and age}}.
{{Death-date and age }} As {{Death date and age}}, but accepts dates in text form ('15 June 1950', 'June 15, 1950', 'June 1950', etc.).
{{Death date and given age }} To display a death date and specified age.
{{Death year and age }} To display a year of, and approximate age at death.
age only
Conventional age templates  Description / use 
{{Age in years, months, weeks and days }} Number of complete years, months, weeks and days between two dates.
{{Age in years, months and days }} Number of complete years, months and days between two dates.
{{Age in years and months }} Number of complete years and remaining months between two dates.
{{Age in years and days }} Number of complete years and remaining days between two dates.
{{Age in years and days nts }} {{Age in years and days}} with output formatted for use in number sortable tables.
{{Age in decimal years }} Number of years between two dates, rounded to the specified number of decimal places.
{{Age in years }} Number of years between two dates.
{{Age in years nts }} {{Age in years}} with output formatted for use in number sortable tables.
{{Age in months }} Number of months between two dates.
{{Age in weeks and days }} Number of weeks and days between two dates.
{{Age in weeks }} Number of weeks between two dates.
{{Age in days }} Age in days between two dates.
{{Age in days nts }} {{Age in days}} with output formatted for use in number sortable tables.
Reverse-determined age template  Description / use 
{{Age }} Age based on number of complete years between two dates.
{{Age nts }} {{Age}} with output formatted for use in number sortable tables.
{{Age as of date }} Current age (in years) from a known age at a specified date.
{{Age for infant }} Current age for infant: months and days up to one year, years and months up to three years, and years beyond age 3.
start / end dates
Date-focused templates  Description / use 
{{Start date }} / {{End date }}
{{Start-date }} / {{End-date }}
miscellaneous
Template  Description / use 
{{OldStyleDateDY }} As {{OldStyleDate}} but used when Julian / Gregorian dates fall in different years.
{{OldStyleDateNY }} As {{OldStyleDate}} but without the year.
The above documentation is transcluded from Template:Start date/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.

AltStyle によって変換されたページ (->オリジナル) /