Template:PhotoDate

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Category:Photographs taken on 2024-11-05 = 5 November 2024

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:PhotoDate/doc.

This template adds files to “taken on” categories and also shows a date of photo in the language set in the preferences.

Usage

{{PhotoDate |1= |2= |3= }}

or

{{ PhotoDate1 = JJJJ2 = MM3 = DD }}

or

{{ PhotoDate1 = JJJJ2 = MM3 = DDlocation = Location }}

Template parameters

ParameterDescriptionDefaultStatus
1Yearnumber of decimal digits: 4emptyrequired
2Monthnumber of decimal digits: 2emptyrequired
3Daynumber of decimal digits: 2emptyrequired
locationLocationCategorises the file under the Category:Photographs by date by country category treeemptyoptional
<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

This template adds files to “taken on” categories and also shows a date of photo in the language set in the preferences.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Year1

number of decimal digits: 4

Stringrequired
Month2

number of decimal digits: 2

Stringrequired
Day3

number of decimal digits: 2

Stringrequired
Locationlocation

Categorises the file under the “Photographs by date by country” category tree

Stringoptional

Additional information

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

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

Placement: At the bottom of the page

Relies on:

Example

{{PhotoDate|2024|11|05}}

renders as:

5 November 2024

See also

Localization

This template is not intended to be localized.