Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2549272fc68b071

Jump to content

Template talk:Date

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 1 month ago by Jonesey95 in topic Slash as a date separator

How to copy

[edit]

I want to make template on another wiki that just gives the current date, but I can't see which part of the code is the one that actually generates the date. Could someone help me with the basic code I need to make such a template on another wiki? ·maunus · snunɐɯ· 22:12, 26 March 2025 (UTC)Reply

I believe this was handled at Wikipedia:Help desk#Date template (in brief, don't use this; use #time magic word). Johnuniq (talk) 00:33, 27 March 2025 (UTC)Reply

Do not substitute date template in article space

[edit]

A few years ago a User:FireflyBot edited all the pages that the {{date}} template should not be used in the article space

So far an example {{date|2024-04-08|MDY}} is parsed just the date April 8, 2024 same goes with the {{FULLDATE}} template and #time parser function


The {{date table sorting}} template however {{date table sorting|2006|08|26}} only August 26, 2006 is visible, but you can see the hidden sort key at Special:ExpandTemplates you'll see it result as <span data-sort-value="000000002006-08-26-0000" style="white-space:nowrap">August 26, 2006</span>

Similarly the {{birth date}} template although {{birth date|1946|6|14}} we only see June 14, 1946 visible but the hidden part is <span style="display:none">(<span class="bday">1946-06-14</span>)</span>June 14, 1946

So like in the President Donald Trump article you see {{birth date and age|1946|6|14}} outputs as June 14, 1946 (age 80) 2600:2B00:B707:7E00:0:0:0:1000 (talk) 06:10, 2 July 2025 (UTC)Reply

Do you have a question? – Jonesey95 (talk) 02:32, 5 July 2025 (UTC)Reply

Template-protected edit request on 20 October 2025

[edit]

ISO date format wrong when year is missing, so use 2026-07-30 for all outputs, July 30 isn't an ISO format 2600:2B00:B70A:5F00:0:0:0:1000 (talk) 00:29, 20 October 2025 (UTC)Reply

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. Also, see the "Known issues" section of the documentation.Jonesey95 (talk) 01:00, 20 October 2025 (UTC)Reply
Well technically 2026 July 30 is the only unacceptable date format here per MOS:DATEFORMAT
All formats are acceptable except for 2026 July 30
{{date}} all formats
Date Formats
Format Full date Year missing Day missing
DMY/Default 30 July 2026 30 July July 2026
MDY July 30, 2026 July 30 July 2026
YMD 2026 July 30 July 30 July 2026
ISO 2026-07-30 July 30 July 2026
2600:2B00:B70A:5F00:0:0:0:1003 (talk) 04:17, 25 October 2025 (UTC)Reply

Slash as a date separator

[edit]

I wonder why this template doesn't support slash as a date separator, both as input and output.
Firstly, as input, because it is undoubtedly the most used date separator in the world (see List of date formats by country), so we could more easily automatically convert more dates to our desired format, instead of doing that manually. Secondly, as output, in order to achieve full compatibility with other templates, eg.: I would like to integrate {{date}} templates into a timeline syntax, but that would require slash as a date separator (see Help:EasyTimeline syntax#DateFormat). Since we added ldmy, lmdy etc., can we also add something like sdmy or /dmy to get that output? As long as we use it that way (either as input to convert, or as inside code to instruct other templates), it would not violate any rule in MOS:DATEFORMAT & WP:DATEOVERVIEW. The only rule is to not use that format as plain-text output inside articles. Let me know if there are chances to add that. Est. 2021 (talk · contribs) 13:06, 6 June 2026 (UTC)Reply

Slashes as date separators are not allowed on Wikipedia, primarily because they are ambiguous. What does 2021/05/04 or 04/05/2021 mean? Making people pay attention to the dates they input helps to ensure that they are putting the month and day in the right place. I have seen slash notation mess up even professional writers and editors: in The Perfect Mile, by Neal Bascomb, there are incorrect dates that were clearly created from misinterpretation of slashed dates, leading to tables incorrectly showing outdoor mile races held in Scandinavian countries in the dead of winter. Oops. – Jonesey95 (talk) 14:47, 6 June 2026 (UTC)Reply
@Jonesey95: They are not allowed as visual output in articles, but they are allowed as input (see Help:EasyTimeline syntax#DateFormat). What does 2021/05/04 or 04/05/2021 mean? Same as 2021-05-04 or 04-05-2021, so the issue is not on the separator: based on the cultural system of origin, we'd still have to distinguish day-first formats from month-first formats, as we already do with DMY, MDY, YMD, etc. Est. 2021 (talk · contribs) 15:55, 6 June 2026 (UTC)Reply
The timeline syntax requires editors to specify whether the slashed dates are month-first or day-first, and the English Wikipedia has no control over the allowed input format. Slashed dates are not allowed as input here, because they are ambiguous. All input complies with MOS:DATEFORMAT, and for good reason. I guarantee you that if we allow slashed-date input, people will put in dates like 04/05/2021, intending to get 4 May 2021, but the template will output 5 April 2021 in error, the editors will not notice, there will be no source to check, and the errors will persist for years. Let's not go down that road. – Jonesey95 (talk) 17:03, 6 June 2026 (UTC)Reply
I can't find a passage in MOS:DATEFORMAT that restricts the input format for templates; can you quote the passage that says that? If we were thinking of making changes to MOS:DATEFORMAT, I wouldn't want a general restriction that says inputs must be one of the formats defined in MOS:DATEFORMAT. For example, there might be a template out there that takes modified Julian date as one of the allowed input formats, which could be appropriate for some templates. Jc3s5h (talk) 17:23, 6 June 2026 (UTC)Reply
See the table called "Unacceptable date formats", where all slashed formats for months and days are disallowed. If you want to change MOS, feel free to start a conversation at the MOS talk page and ping me. I'll come on over and repeat the arguments. Other editors will probably be able to give other examples. – Jonesey95 (talk) 01:18, 7 June 2026 (UTC)Reply