Portal:Current events/DateHeader2

This template is used by Portal:Current events and sub-pages.
{{Portal:Current events/DateHeader2|2007|3|1}}
|}

gives:

Current events of Hlakola 1, 2007 (2007-03-01) () [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/2007_

Hlakola_1&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/2007_

Hlakola_1|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/2007_

Hlakola_1|action=watch}} watch]

and

{{Portal:Current events/DateHeader2|2007|3|14}}
defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi 
|}

gives:

Current events of Hlakola 14, 2007 (2007-03-14) () [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/2007_

Hlakola_14&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/2007_

Hlakola_14|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/2007_

Hlakola_14|action=watch}} watch]

defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi defghi

Note that the template opens two nested tables and closes only the inner one. Therefore after the template call and optional extra table rows, a closing tag is required. Without extra rows we have a header in a double box, while with text in the extra row(s) we get that text in the outer box below the boxed header.

The first example has the anchors #2007_March_1 and #2007_March_01, the second the anchor #2007_March_14. Having the full date as anchor name allows transclusion of day pages from different years on one page, without collision of anchor names (otherwise there would be equal anchors of which only the first would be effective).

Thus we can use the section links March 2007#2007 March 1, March 2007#2007 March 01, and March 2007#2007 March 14.

The first is not recommended, because when applying Special:Linksearch to find links in external style to the content on 1 March, one would get also those to content on 10 March, etc.

The anchors have a fixed format, while the page contains with a "bold" specification the expanded wikitext such as "[[March 14]], [[2007]]" which due to the date formatting feature produces links of which one has a user-dependent link label, but with fixed targets "March 14" and "2007"; it also has various links related to the page Portal:Current events/2007 March 14.

Unfortunately it does not seem possible to have a link with the same target as March 2007#2007 March 14 but with a link label like the combined labels of the user-dependent March 14,2007. The best seems something like "14 March, 2007 [1]" (linking to the section of the month page); backlinks of this type are found by [2].

The day number in the anchor has, when below 10, a leading zero, see also [3].

To find the weekday this template uses #time, therefore the weekday is only supplied for dates in the period 1970 - 2037.

Examples outside this range:

 {{Portal:Current events/DateHeader2|1897|3|14}} gives

Current events of Hlakola 14, 1897 (1897-03-14) [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/1897_

Hlakola_14&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/1897_

Hlakola_14|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/1897_

Hlakola_14|action=watch}} watch]

[4]

(would give an error message)


 {{Portal:Current events/DateHeader2|1967|3|13}} gives

Current events of Hlakola 13, 1967 (1967-03-13) [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/1967_

Hlakola_13&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/1967_

Hlakola_13|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/1967_

Hlakola_13|action=watch}} watch]

[5]

(would compute the weekday of 1 January 1970!)


 {{Portal:Current events/DateHeader2|1967|3|14}} gives

Current events of Hlakola 14, 1967 (1967-03-14) [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/1967_

Hlakola_14&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/1967_

Hlakola_14|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/1967_

Hlakola_14|action=watch}} watch]

[6]

(ditto)


 {{Portal:Current events/DateHeader2|2047|3|14}} gives

Current events of Hlakola 14, 2047 (2047-03-14) [http://nso.wikipedia.org/w/index.php?title=Portal:Current_events/2047_

Hlakola_14&action=edit&editintro=Portal:Current_events/Edit_instructions edit]

[//nso.wikipedia.org{{localurl:Portal:Current events/2047_

Hlakola_14|action=history}} history]

[//nso.wikipedia.org{{localurl:Portal:Current events/2047_

Hlakola_14|action=watch}} watch]

[7]

(would give an error message)


"{{WEEKDAYNAME|{{JULIANDAY|{{{1}}}|{{{2}}}|{{{3}}}}}}}" can be used to compute the weekday for all dates. This has not been built in since the template is currently not used for dates outside the period 1970 - 2037. See e.g. 1969#January, which does not have enough text for each day to merit a separate header.

Microformat

lokiša

The HTML mark up produced by this template includes an HCalendar macro, which makes the event/ date details parsable by computers, either acting automatically to catalogue article across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to a calendar or diary application. For more information about the use of micromormats on Wikipedia. hCalendar uses HTML classes including:

  • description
  • dtend
  • dtstart
  • location
  • summary
  • vevent

Please do not rename or remove these classes; nor collapse nested elements which use them.

See also

lokiša