Template:Date context

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:Date context/doc.

This template allows to specify a context for a date.

Usage


{{Date context |1= |2= |3= }}

The parameter {{{2}}} and the optional parameter {{{3}}} can be ISO 8601 dates

Possible values for {{{1}}}:

  • "cast": statue cast at time {{{2}}}
  • "created": object created at time {{{2}}}
  • "dedicated": object dedicated at time {{{2}}}
  • "destrоyed": object destrоyed at time {{{2}}}
  • "digitized": analog original was digitized at time {{{2}}} (to be used when "scanned" does not fit, e.g. time when a digital photograph of a painting was taken or an old vinyl record was digitized)
  • "published": object published at time {{{2}}}
  • "scanned": analog original was scanned at time {{{2}}}
  • "validity": file valid for the time frame {{{2}}} till {{{3}}} (e.g. a map, that shows a state that applied for a limited timeframe only)
  • "vectorized": object vectorized at time {{{2}}}

Template parameters

ParameterDescriptionDefaultStatus
1typetype of dateemptyrequired
2datedate in ISO 8601 formatemptyrequired
3second datesecond date in ISO 8601 formatemptyoptional
langlanguagelanguage code (only needs to be provided if the language shall be fixed and independant from the user's preferences){{int:Lang}}optional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Category:Templates using TemplateData

This template allows to specify a context for a date.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
type1

type of date

Suggested values
cast created dedicated destroyed digitized published scanned validity vectorized
Linerequired
date2

date in ISO 8601 format

Linerequired
second date3

second date in ISO 8601 format

Lineoptional
languagelang

language code (only needs to be provided if the language shall be fixed and independant from the user's preferences)

Default
{{int:Lang}}
Lineoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Relies on:
{{ISOdate}}, {{LangSwitch}}

See also

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

Category:Templates using LangSwitch for internationalisation Category:Time, date and calendar templates#Date%20context Category:Multilingual tags: Date#Date%20context Category:Internationalization templates using LangSwitch#Date%20context
Category:Internationalization templates using LangSwitch Category:Multilingual tags: Date Category:Templates using LangSwitch for internationalisation Category:Time, date and calendar templates