Time Template‑class | |||||||
|
|
|
Currently all dates are being delinked by bot. There may however be a few cases where a date should remain linked. A solution might be to add a parameter to this template to include a link. So {{date|11 January 2009|link}}
would convert it to "[[11 January]] [[2009]]" turning up as
11 January
2009 in the article. The bot would not see this as a linked date and leave it alone. Combination parameters like dmylink, mdylink, isolink etc could be made as well. −
Woodstone (
talk) 23:18, 10 January 2009 (UTC)
{{date|11 January 2009|ldmy}}
emits
11 January
2009
{{#time}}
, which is a server function, and which returns the desired part(s) in the desired order.{{date|<some date>|dmy}}
is effectively the same as {{#time:j F Y|<some date>}}
.{{date|<some date>|ldmy}}
is effectively the same as {{#time:[[:j F]] [[Y]]|<some date>}}
.Thanks. That makes sense. You may have seen at Wikipedia talk:Manual of Style (dates and numbers)#Date linking template, that I have proposed to use this template as as escape for the exceptional date links that should not be removed by bots. − Woodstone ( talk) 19:24, 11 January 2009 (UTC)
|{{#ifexpr: {{#time:Y|{{{1|}}} }} < 1582|none}}
|{{#ifexpr: {{#time:Y|{{{1|}}} }} < 1000|none}}
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
I tested the change in one of my sandboxes. I found that dates that exist in the Julian calendar but not in the (proleptic) Gregorian calendar are not reformated to the d mmmmm yyyy format, which is the default format.
Also, the behavior of the template was changed (or an attempt to change it was made) with no corresponding change in the documentation.
Finally, I don't see that this would necessarily solve the problem of linking dates in a way that will not be detected by bots that unlink dates. In the past, there was a desire to always link both the day-month and the year. Now, linking is to be far more selective, so it is likely that in the rare instances a link is a good idea, there will probably be a wish to link the day-month, but not the year, or vise versa. I don't think the date template fully supports, that, does it? -- Gerry Ashton ( talk) 00:00, 12 January 2009 (UTC)
Hi,
I'm wanting to use the date template within a different template (citation/core), but if I do so, it will sometimes be passed partial dates. At present {{
date|1901}}
renders as 1901
. This is because {{[[Template:#time|#time]]}} recognises any 4-digit string as a time if it can. I think I've fixed this in {{
Date/sandbox}}; could someone familiar with this template confirm that this won't introduce any errors?
Thanks,
Martin ( Smith609 – Talk) 13:57, 30 January 2009 (UTC)
{{
editprotected}}
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
<!--
--> = {{{1|}}}<!-- error or "none", so no formatting -->
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
|{{#ifeq:{{{1|}}}|{{#expr:0+({{{1|0}}})}}|none}}
<!--
--> = {{{1|}}}<!-- error or "none", so no formatting -->
{{date||}}
){{T1|1985|ldmy}}
=>
1985{{T1|1901|ldmy}}
=>
1901{{T1|1985.123|ldmy}}
=> 1985.123 (no change because error){{T1|-1985|ldmy}}
=> -1985 (no change because error){{T1|1985-10-21|ldmy}}
=>
21 October
1985{{T1|1901-10-21|ldmy}}
=>
21 October
1901{{T1|October 21, 1985|ldmy}}
=>
21 October
1985{{T1|21 October 1985|ldmy}}
=>
21 October
1985{{T1|October 21|ldmy}}
=>
21 October{{T1|21 October|ldmy}}
=>
21 October{{T1|October|ldmy}}
=>
October{{T1||ldmy}}
=>
7 June{{date/sandbox|2009-01-30}}
→ 30 January 2009(
)as expected - I like the way Martin's method catches this false positive.
{{date/sandbox|20090130172000}}
→ 30 January 2009({{subst:CURRENTTIMESTAMP}}
Input | {{
date}}
|
{{
date/sandbox}}
|
{{ T1}} |
---|---|---|---|
1985 | 1985 | 1985
( ) |
1985 |
1901 | 1901 | 1901
( ) |
1901 |
1985.123 | 1985.123 | 1985.123
( ) |
1985.123 |
-1985 | -1985 | -1985
( ) |
-1985 |
1985-10-21 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
1901-10-21 | 21 October 1901 |
21 October
1901
( ) |
21 October 1901 |
October 21, 1985 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
21 October 1985 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
October 21 | 21 October |
21 October
( ) |
21 October |
21 October | 21 October |
21 October
( ) |
21 October |
October | October |
October
( ) |
October |
7 June |
7 June
( ) |
7 June | |
20090130175933 | 30 January 2009 |
30 January
2009
( ) |
30 January 2009 |
20090130 | 20090130 | 20090130
( ) |
20090130 |
200901301759 | 200901301759 | 200901301759
( ) |
200901301759 |
19850521175933 | 21 May 1985 |
21 May
1985
( ) |
21 May 1985 |
19850521 | 19850521 | 19850521
( ) |
19850521 |
198505211759 | 198505211759 | 198505211759
( ) |
198505211759 |
2007b (Harvard ref) | 7 June |
7 June
( ) |
7 June |
(ec)
{{date|20090130172000|ldmy}}
=>
30 January
2009{{T1|20090130172000|ldmy}}
=>
30 January
2009{{#ifeq:{{#time:Y|20090130175933 2008}}{{#time:Y|20090130175933 2004}}|20082004|yes|no}}
→ yes. Since there's sod all we can do with lone years other than link them, I can't see very much benefit to putting them through the whole formatting mangle.
Happy‑
melon 18:21, 30 January 2009 (UTC){{T1|20090130172000|ldmy}}
=>
30 January
2009 works now. --
Fullstop (
talk) 18:39, 30 January 2009 (UTC):D
. One other one we might want to think about is yyyy-mm-ddThh:mm:ssZ, which is the output format from the API.
Happy‑
melon 19:44, 30 January 2009 (UTC)I don't know if this helps, but adding "0:00" to the start of a year forces #time to recognize it as a year instead of a time. For example, {{#time:Y|0:00 1999}}
= 1999. So, we should be able to make {{date|1999}}
= 1999. —
Remember the dot (
talk) 20:25, 1 February 2009 (UTC)
Trying to keep up with the latest crazy format crisis without string functions is doing my head in! Apparently "2007b
" is a common and accepted input to |date=
parameters of citation templates when using Harvard referencing. Clearly this should be returned unhandled, but it's currently not:
(
)I can't think of a way to test for this off the top of my head. Does anyone have any bright ideas? Happy‑ melon 21:00, 9 February 2009 (UTC)
I don't have the 15th edition of the Chicago Manual of Style, but according to a summary "Chicago style now prefers full dates American style, in month day, year format. " -- Gerry Ashton ( talk) 04:50, 10 February 2009 (UTC)
To return to the issue at hand, see here (or here). -- Fullstop ( talk) 06:16, 10 February 2009 (UTC)
I was updating a couple of heavily used templates to use {{ date}} and discovered that there is a limit to the number of times {{#time}} can be called in one page. I'm not sure if this limit is related to the recent server update or an unknown bug the ParserFuction software. -- Farix ( Talk) 15:40, 18 February 2009 (UTC)
{{
date}}
and the resultant 2,758 calls to #time are evidently not a problem.This template also exists at Commons, but the input requirements are different. I feel they should be the same so users that hop between the projects can use just one format. Please comment at Commons if interested. ~ ωαdεstεr16 «talk stalk» 05:02, 6 May 2009 (UTC)
How about having the template output include an
between day and month, so they aren't split by line breaks?
—WWoods (
talk) 14:25, 9 August 2009 (UTC)
{{#time:F j, Y}}
=> ok{{#time:j|{{#time:F j, Y}}}}
=> error{{#time:F" "j," "Y}}
? I'm guessing no. I tried it in the sandbox (
diff), and it works (checked the test cases as well), but I'm not sure how to test the nesting problem. --
Fru1tbat (
talk) 13:44, 7 July 2011 (UTC)
I can find no reference on the template page to "user" or "preferences". Does the {{date}} template take into account the preferences of a logged-in user? HWV258 21:09, 2 December 2009 (UTC)
User:Dinoguy1000/scripts/ISO date format unifier.js
. ---—
Gadget850 (Ed)
talk 12:47, 18 December 2009 (UTC)
Is it possible to modify this template to make it sortable under the table class wikitable sortable? -- 173.183.102.184 ( talk) 10:05, 4 January 2010 (UTC)
Template:Today has been nominated for merging with Template:Date. You are invited to comment on the discussion at the template's entry on the Templates for discussion page. Thank you. Set Sail For The Seven Seas 267° 58' 0" NET 17:51, 3 August 2010 (UTC)
{{
editprotected}}
Could a
templatey
administrator change all cases of {{{subst|}}}
to {{{|safesubst:}}}
? Thanks.
Set Sail For The Seven Seas
290° 27' 30" NET 19:21, 4 August 2010 (UTC)
This template does not appear to support BC dates. Because it might be useful, I have implented a BC date template for use with BC dates. But it would be better if you integrated it into this -- then my template would be useless if you did integrate! 'rdococ!' 11:58, 9 July 2011 (UTC) — Preceding unsigned comment added by Rdococ ( talk • contribs)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Your document says: "Recognized values for the second parameter are ... dmy gives d mmmm yyyy (eg 16 July). " The yyyy is missing. yyyy is similarly missing for any other second parameter value listed. It isn't just a document problem, because the template is used to generate the end of that document text, which is encoded as {{date||dmy}}. Therefore, the document is also wrong when it says "If no date is specified, the template emits the current date. For example, {{date}} produces 16 July 2011." You only get the year if the second parameter is also missing. If you specify the second parameter but not the first, the year disappears. Is that what you really wanted the template to do, or is there a software bug in the template itself, in addition to document problems? Art LaPella ( talk) 01:35, 16 July 2011 (UTC)
This template does not support the output of ~~~~~ which is 07:09, 10 May 2012 (UTC). I think this should be important to support especially for places were a last updated date may be written as ~~~~~ and then processed by the date template. -- ben_b ( talk) 07:09, 10 May 2012 (UTC)
I have added the parameter lnone
i.e. link but don't format. To make things easier I also added link
which does the same. Thus {{date|
xyz|lnone}}
& {{date|
xyz|link}}
are equivalent to [[
xyz]]
which seems pretty useless, right. So what was the point. It seems likely that a bot is going to go and clean up a lot of the residual mess left over from the bad old days of date linking. Here's a way to link years, decades, centuries, days of the week, etc. without having the bot delink them in the off chance that we'd actually want the link.
JIMp
talk·
cont 09:07, 2 July 2012 (UTC)
It is my understanding that the output of {{ date}} pays attention to user preferences, so that those who want dmy get it, and those that want mdy get that. Have I understood correctly? Reading above, it seems not. Apart then from standardising, it all seems a little pointless.
Following on, does the output take any account of user's local language? - January or janvier etc.
Either or both of these would be good for moving on with
John of Cromer in Philippines ( talk) mytime= Mon 16:22, wikitime= 08:22, 15 April 2013 (UTC)
I think I need to say this: without a default that takes into account user preferences for dates, I think this template is largely useless. It defaults to the dmy format. It should default to either the user date preference, or an article-wide preference, or the dmy/mdy format it was given in, or dmy otherwise, in that order.
Is there a way to expose user preferences from templates? Or to combine this with Template:Use mdy dates and friends through some sort of article-wide preference? Maybe using WP:Lua? Int21h ( talk) 06:53, 29 May 2013 (UTC)
I heartily second this request. I think it imperative, and a grave omission, that the template doean't already do this. I'd have thought it a fundamental requirement. As I indicated above, I also think it should take into account user's language preference (which basically is only month name). John of Cromer in transit ( talk) mytime= Wed 11:32, wikitime= 10:32, 29 May 2013 (UTC)
As of 16 September 2013 the template operates such that {{date}} returns the full date (dmy, day month year format), but there is no way to get the full date in mdy, month day year format. Since Wikipedia guidelines stress consistent use of dmy or mdy format within an article, this missing functionality results in unwanted inconsistencies. For example, see the lead paragraph in the Voyager 1 article.
I would like to propose an extension to the {{date}}template, as follows:
The use of the "df=y" and "mf=y" is consistent with other date templates (ex: {{birth date and year}}), and allow use of either dmy or mdy format, whichever is appropriate, while maintaining all existing functionality. Truthanado ( talk) 23:26, 16 September 2013 (UTC)
"{{date|{{date}}|mdy}}"
produces: "June 7, 2024". --
Michael Bednarek (
talk) 12:32, 17 September 2013 (UTC)Shouldn't mdy be the standard format? That is what is mostly used on Wikipedia I thought. -- Jwikiediting ( talk) 23:11, 9 October 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
When I type {{date||mdy}}, it's not giving me the year, just the month and day (June 18). It doesn't do it in the documentation either, despite {{date|2006-08-04|mdy}} including the year. When the second parameter is left blank, there is no year produced. You instead have to type {{date|{{date}}|mdy}} to get it to display as documented. This should be corrected to reduce unnecessary clutter in the edit space. Ben Yes? 18:52, 18 June 2014 (UTC)
Is there a way to format dates that are input, without it defaultly providing the current date if none is provided. Alternatively, is there a template that performs such formatting? -- Zfish118 ( talk) 19:32, 15 July 2014 (UTC)
{{#if:…}}
can be used. --
Michael Bednarek (
talk) 03:37, 16 July 2014 (UTC)
{{cite web|url=http://example.com | title=example.com | accessdate={{#if:{{{1|}}}|{{date|{{{1}}}}}|}}|}} -- {{{1}}} being a user specified date. -- Zfish118 ( talk) 15:11, 16 July 2014 (UTC)
Since it is now 15:53, 5 July 2015 (UTC), the following is obviously untrue:
{{date}}
produces 27 June 2015.But if I actually enter {{date}}
, I get the correct result, currently 5 July 2015.
As live evidence, this paragraph ends with a live invocation of {{date}}
, which should be accurate whenever you read this: 7 June 2024
So these examples are confusing, to say the least. What's going on? Please {{Ping}} me to discuss.
-- Thnidu ( talk) 15:54, 5 July 2015 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I'm doing a search and replace to remove inappropriate uses of {{
Start date}} for alternative dates in episode lists. {{
Date|2015-7-13|mdy}}
gives "July 13, 2015" as expected, but substituting it results in "13 July 2015".
nyuszika7h (
talk) 14:58, 11 September 2015 (UTC)
{{lc:}}
magic word not being substituted. I've
edited the sandbox version to fix that; substituting it gives {{
subst:Date/sandbox|2015-7-13|mdy}}
→ "July 13, 2015". Unfortunately the template is fully protected rather than template-protected, so an admin will be needed to either make the change to the real template or reduce the protection level.
SiBr4 (
talk) 16:47, 11 September 2015 (UTC)Should we use the date microformat for dates to allow parsers to get the semantics that it is a date? -- MartinThoma ( talk) 19:54, 22 March 2016 (UTC)
"This template should only be used internally in other templates." (It doesn't say why, but I'm okay with it.)
Despite this, {{date}} is used many times in many articles.
The easy way to clean up the mess should be substitution, which would replace each template invocation ({{date|2015-02-13|mdy}}) with its expansion (February 13, 2015) in the markup, upon saving.
Mass-replacing '''{{date''' with '''{{subst:date''' does not work inside <ref> tags. ( A bug reported since 2005.)
Mass-replacing '''{{date''' with '''{{[[Help:Substitution#The safesubst: modifier|safesubst]]:date''' works inside <ref> tags. - A876 ( talk) 07:51, 10 February 2018 (UTC)
It's used in the oldest people articles, it uses age as of 7 June 2024
{{
date}}
- 7 June 2024
I was seeing if all numeric can work, when I use DD/MM/YYYY, MM-DD-YYYY, MM.DD.YYYY, MM.DD.YY, MM-DD-YY, YY/MM/DD, YY.MM.DD, YYYY.MM.DD are all invalid, formats MM/DD/YYYY, DD-MM-YYYY, DD.MM.YYYY, YYYY-MM-DD, YYYY/MM/DD are all valid
input | {{date}} |
---|---|
{{date|05/31/2012}} | 31 May 2012 |
{{date|05-31-2012}} | 05-31-2012 gives me an error |
I normally use {{date|05/31/2012}} which doesn't give me any errors, I use slashes indicate MM/DD/YYYY and hyphens DD-MM-YYYY — Preceding unsigned comment added by 98.31.29.4 ( talk • contribs) 00:21, 24 July 2018 (UTC)
{{date|05/31/2012}} displays 31 May 2012
{{Date|2008 December 1|MDY}}
gives 2008 December 1 expected December 1, 2008, so what's the point?— Preceding
unsigned comment added by
2605:a000:1103:220f:cda:5ac6:a081:c425 (
talk •
contribs) 18:11, 25 July 2018 UTC (UTC)
Here's a way around this
{{date|{{YMD to ISO|2011 August 16}}|DMY}}
gives 16 August 2011
{{date|{{YMD to ISO|2011 August 16}}|MDY}}
gives August 16, 2011
{{date|{{YMD to ISO|2011 August 16}}|ISO}}
gives 2011-08-16
{{date|05/31/2012}} gives 31 May 2012
{{date|5/31/2012}} gives 31 May 2012
{{date|05/31/12}} gives 31 May 2012
{{date|5/31/12}} gives 31 May 2012
— Preceding unsigned comment added by 2605:a000:1103:220f:b16b:1989:746e:84ab ( talk • contribs) 00:54, 28 July 2018 (UTC)
So for an example
{{date|06/04/2016|ISO}} gives me 2016-06-04 which works perfectly
{{date|Jun 4|ISO}} gives me June 4 gives me the same format as {{date|Jun 4|MDY}} and {{date|Jun 4|YMD}}
So help me is there anyway to display September 2 as --09-02 for the ISO format? — Preceding unsigned comment added by 2605:a000:1103:c3:399a:138a:ed29:909c ( talk • contribs) 21:23, 2 September 2018 (UTC)
09-02
or whatever you want. However, that is very unlikely to be desirable.
Johnuniq (
talk) 23:25, 2 September 2018 (UTC)
Here's what can solve the problem
06-07, displays the current date
09-02
Date with year: 2024-06-07
Date without year: 06-07
— Preceding
unsigned comment added by
2600:1:b1a6:97c5:b53a:2108:a250:3651 (
talk •
contribs) 12:56, 24 September 2018 (UTC)
{{date||ISO}} will input the format as Month DD, why?
Yes, the current 2004 version of ISO 8601 does not permit omitting the year from a date, but this template will supposedly produce an ISO output when the year is missing. — Preceding unsigned comment added by 2600:1:91B0:EF43:2177:756:393F:B479 ( talk) 19:06, 7 December 2018 (UTC)
I tried displaying {{date|31/05/2012}} to be 31/05/2012 gives an error but {{date|05/31/2012}} gives 31 May 2012
When slashes are interpreted they are in mm/dd/yyyy — Preceding unsigned comment added by 2600:1:b1a6:97c5:b53a:2108:a250:3651 ( talk • contribs) 12:56, 24 September 2018 (UTC)
The docs say "This template should only be used internally in other templates." Does anyone know why templates would have this embedded template, and not use a plain-text date? -- Green C 18:31, 3 January 2019 (UTC)
This template is probably best used as a way of standardizing the appearance of all dates in an article, including those in citation templates and infoboxes.
This template is probably best used internally in other templates.
This template should only be used internally in other templates.
According to the documentation, {{date|Aug 4|ISO}} should output --08-04
; instead, it outputs August 4
, which isn't even a valid ISO string.
Conscious Code (
talk) 21:02, 19 January 2019 (UTC)
Well on Google Sheets if no date is specified is the number 0 which is 30 December 1899, but on this if no date has been specified it will display today's date.-- 2605:A000:1103:45:BC1C:3F06:D44C:C550 ( talk) 18:56, 9 February 2019 (UTC)
How can we force the date output have an abbreviated month (e.g. 15 Mar 2019) like what
{{MONTHABBREV}}
does? There should be an optional parameter like disp=abbr
.–
Sanglahi86 (
talk) 18:21, 14 March 2019 (UTC)
{{#time:j M Y|March 15, 2019}}
reformats a date to that format, or {{#time:j M Y}}
shows the current date in that format.
Frietjes (
talk) 16:52, 18 March 2019 (UTC)
For the phrase "ISO 8601 does not permit omitting from the year", is there agreement that the extraneous "from" can be removed?
Martin Kealey (
talk) 03:59, 7 April 2019 (UTC)
Is there a template which can be used to automatically add dates and find the combined age?
The specific use case I'm looking at is: in the US political system, judges are eligible for a kind of semi-retirement called 'senior status' once their age > 65 and their age + their number of years as a judge = 80. (So, an 80-year old judge would always be eligible for senior status, a 70-year old judge would only be eligible if he'd served as a judge for at least 10 years, a 65-year old judge would only be eligible if he'd served as a judge for at least 15 years, and a 60-year old judge would not be eligible). I'm experimenting (right now just on my sandbox page) with adding a 'Senior Status eligible?' column to the lists of judges on the various courts pages, but keeping that maintained manually on the hundred+ court pages wouldn't be tractable.
What I'm hoping is for there to be a template where I could put in multiple dates and have Wikipedia calculate their combined age. So if one judge was born exactly 65 years ago, and that judge started judicial service exactly 10 years ago, I could enter both those dates into the template and have the template say something like 'combined age 75 years', which I could then use to sort the judges and indicate those who are eligible for senior status.
Does a template like that exist?
Thanks! AaronCanton ( talk) 02:03, 21 November 2019 (UTC)
I'm concerned about the use of calculating something like senior status, rather than updating it manually. It's entirely possible that a judge dies before reaching senior status. It's also entirely possible that the Wikipedia article about the judge will not be updated to reflect the death. If a calculation is done, Wikipedia will appear to affirmatively state that the judge reached senior status when (s)he never did. Jc3s5h ( talk) 17:31, 25 November 2019 (UTC)
For example, if it is nested in a template that feeds it 2021-02-03
, can I tell it to ignore the year and give me February 3
as an output? —
Arctic Gnome (
talk •
contribs) 01:31, 21 January 2021 (UTC)
{{extract|3 Feb 2021|show=%{monthname} %{day} }}
→ February 3{{extract|2021-2-3|show=%{monthname} %{day} }}
→ February 3{{extract|2021-2-3|show=%B %-d}}
→ February 3Documentation tells that there shall be a significant difference in presentation of
{{date}}
{{date|}}
Please note:
1
has suggested state in VisualEditor. That does mean that an empty field will be created always if this template is touched by VE.Greetings -- PerfektesChaos ( talk) 15:12, 19 March 2021 (UTC)
|1=
does not exist. In the second instance, |1=
exists but is empty. –
Jonesey95 (
talk) 18:37, 27 June 2021 (UTC)This is not directed just towards this template, but to all templates that have a date field. Take the following six examples:
{{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help)Of these, only the first and third parse, even though it is immediately clear to the reader what dates are intended by the rest. This becomes a problem where dates formatted with these variations are copied from a source website. Putting aside MOS issues, can't we make templates recognize that 05 in any "day" parameter means 5, and that in the month parameter, April = Apr. = Apr = APR = APRIL? We can always have a bot come through and conform them to the preferred style later on. BD2412 T 05:12, 27 April 2022 (UTC)
I would add, by the way, that this should apply to different month shortenings, as with:
{{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{date|1948 18 January|MDY}}
outputs as January 18
without the year instead of January 18, 1948
Even with YDM
parameter isn't recognized, for an example {{date|January 18, 1948|YDM}}
outputs as 18 January 1948
(expected 1948 18 January
) as if it we're to be treated as DMY
format
So using
template, {{
FULLDATE}}
{{FULLDATE|type=mdy|time=1948 18 January}}
outputs as January 18, 2024
as the current year (expected January 18, 1948
)
How is YDM
parameter not an option?, it's treated like if it were to be DMY
-- 98.31.29.4 ( talk) 21:31, 3 June 2022 (UTC)
YDM
input or output would need to be examined so any format like where {{date|2=YDM}}
outputs as 2024 7 June
{{date|January 18, 1948|YDM}}
outputs as 1948 18 January
{{date|1948 18 January}}
outputs as 18 January
with the year missing even when using{{FULLDATE|type=dmy|time=1948 18 January}}
outputs as 18 January 2024
with the {{
Currentyear}}
instead of 1948
, so YDM
doesn't return unalternated as an input like how YMD
does but it does not provide the year though.
2603:6011:E00:4C41:0:0:0:100F (
talk) 02:54, 18 March 2024 (UTC)Could we please allow an option of showing abbreviated months, like Sept. 9, 2022
? This would be useful in tables and infoboxes where space is limited. —
Arctic Gnome (
talk •
contribs) 15:08, 9 September 2022 (UTC)
Sep 9, 2022
" would be valid, though. I don't see a way to generate that format using this template, however. –
Jonesey95 (
talk) 18:23, 9 September 2022 (UTC)
|mdy = F j, Y
. Could that be followed by a line reading |mdy-short = M j, Y
? —
Arctic Gnome (
talk •
contribs) 19:29, 9 September 2022 (UTC)I would like to know how to automatically age a date and age template in Portuguese, case in point: Predefinição:Presidente da República Portuguesa por idade, I've tried several and failed, this type of parameter works in English templates (example: Template:United States presidents by age).
Best – Ser.Silv. ( talk) 09:35, 26 October 2022 (UTC)
The data template needs to emit the invisible <time></time>
HTML block around the generated date, which is used to communicate the date to accessibility software like screen readers or software for the visually impaired.
Chrome-based web browsers have the ability to localize the date in time blocks to the user's specified language or display preference. Users of these browsers can set their date display preference in the browser's language settings.
Additionally, The time block would allow search engines to parse dates with better precision, allowing them to better suggest Wikipedia articles. — Preceding unsigned comment added by MatthewUtzig ( talk • contribs) 23:12, 7 April 2023 (UTC)
time
is an allowed HTML tag in MediaWiki, there is no reason to not include it. ―
Justin (koavf)❤
T☮
C☺
M☯ 13:17, 8 April 2023 (UTC)
Is there a way with this template (or a similar template) to avoid the default shift to dmy format? But still have the date change if Template:Use dmy dates is used on the page? Rjjiii ( talk) 13:53, 28 October 2023 (UTC)
Time Template‑class | |||||||
|
|
|
Currently all dates are being delinked by bot. There may however be a few cases where a date should remain linked. A solution might be to add a parameter to this template to include a link. So {{date|11 January 2009|link}}
would convert it to "[[11 January]] [[2009]]" turning up as
11 January
2009 in the article. The bot would not see this as a linked date and leave it alone. Combination parameters like dmylink, mdylink, isolink etc could be made as well. −
Woodstone (
talk) 23:18, 10 January 2009 (UTC)
{{date|11 January 2009|ldmy}}
emits
11 January
2009
{{#time}}
, which is a server function, and which returns the desired part(s) in the desired order.{{date|<some date>|dmy}}
is effectively the same as {{#time:j F Y|<some date>}}
.{{date|<some date>|ldmy}}
is effectively the same as {{#time:[[:j F]] [[Y]]|<some date>}}
.Thanks. That makes sense. You may have seen at Wikipedia talk:Manual of Style (dates and numbers)#Date linking template, that I have proposed to use this template as as escape for the exceptional date links that should not be removed by bots. − Woodstone ( talk) 19:24, 11 January 2009 (UTC)
|{{#ifexpr: {{#time:Y|{{{1|}}} }} < 1582|none}}
|{{#ifexpr: {{#time:Y|{{{1|}}} }} < 1000|none}}
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
I tested the change in one of my sandboxes. I found that dates that exist in the Julian calendar but not in the (proleptic) Gregorian calendar are not reformated to the d mmmmm yyyy format, which is the default format.
Also, the behavior of the template was changed (or an attempt to change it was made) with no corresponding change in the documentation.
Finally, I don't see that this would necessarily solve the problem of linking dates in a way that will not be detected by bots that unlink dates. In the past, there was a desire to always link both the day-month and the year. Now, linking is to be far more selective, so it is likely that in the rare instances a link is a good idea, there will probably be a wish to link the day-month, but not the year, or vise versa. I don't think the date template fully supports, that, does it? -- Gerry Ashton ( talk) 00:00, 12 January 2009 (UTC)
Hi,
I'm wanting to use the date template within a different template (citation/core), but if I do so, it will sometimes be passed partial dates. At present {{
date|1901}}
renders as 1901
. This is because {{[[Template:#time|#time]]}} recognises any 4-digit string as a time if it can. I think I've fixed this in {{
Date/sandbox}}; could someone familiar with this template confirm that this won't introduce any errors?
Thanks,
Martin ( Smith609 – Talk) 13:57, 30 January 2009 (UTC)
{{
editprotected}}
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
<!--
--> = {{{1|}}}<!-- error or "none", so no formatting -->
|{{#switch: {{#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
|{{#ifeq:{{{1|}}}|{{#expr:0+({{{1|0}}})}}|none}}
<!--
--> = {{{1|}}}<!-- error or "none", so no formatting -->
{{date||}}
){{T1|1985|ldmy}}
=>
1985{{T1|1901|ldmy}}
=>
1901{{T1|1985.123|ldmy}}
=> 1985.123 (no change because error){{T1|-1985|ldmy}}
=> -1985 (no change because error){{T1|1985-10-21|ldmy}}
=>
21 October
1985{{T1|1901-10-21|ldmy}}
=>
21 October
1901{{T1|October 21, 1985|ldmy}}
=>
21 October
1985{{T1|21 October 1985|ldmy}}
=>
21 October
1985{{T1|October 21|ldmy}}
=>
21 October{{T1|21 October|ldmy}}
=>
21 October{{T1|October|ldmy}}
=>
October{{T1||ldmy}}
=>
7 June{{date/sandbox|2009-01-30}}
→ 30 January 2009(
)as expected - I like the way Martin's method catches this false positive.
{{date/sandbox|20090130172000}}
→ 30 January 2009({{subst:CURRENTTIMESTAMP}}
Input | {{
date}}
|
{{
date/sandbox}}
|
{{ T1}} |
---|---|---|---|
1985 | 1985 | 1985
( ) |
1985 |
1901 | 1901 | 1901
( ) |
1901 |
1985.123 | 1985.123 | 1985.123
( ) |
1985.123 |
-1985 | -1985 | -1985
( ) |
-1985 |
1985-10-21 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
1901-10-21 | 21 October 1901 |
21 October
1901
( ) |
21 October 1901 |
October 21, 1985 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
21 October 1985 | 21 October 1985 |
21 October
1985
( ) |
21 October 1985 |
October 21 | 21 October |
21 October
( ) |
21 October |
21 October | 21 October |
21 October
( ) |
21 October |
October | October |
October
( ) |
October |
7 June |
7 June
( ) |
7 June | |
20090130175933 | 30 January 2009 |
30 January
2009
( ) |
30 January 2009 |
20090130 | 20090130 | 20090130
( ) |
20090130 |
200901301759 | 200901301759 | 200901301759
( ) |
200901301759 |
19850521175933 | 21 May 1985 |
21 May
1985
( ) |
21 May 1985 |
19850521 | 19850521 | 19850521
( ) |
19850521 |
198505211759 | 198505211759 | 198505211759
( ) |
198505211759 |
2007b (Harvard ref) | 7 June |
7 June
( ) |
7 June |
(ec)
{{date|20090130172000|ldmy}}
=>
30 January
2009{{T1|20090130172000|ldmy}}
=>
30 January
2009{{#ifeq:{{#time:Y|20090130175933 2008}}{{#time:Y|20090130175933 2004}}|20082004|yes|no}}
→ yes. Since there's sod all we can do with lone years other than link them, I can't see very much benefit to putting them through the whole formatting mangle.
Happy‑
melon 18:21, 30 January 2009 (UTC){{T1|20090130172000|ldmy}}
=>
30 January
2009 works now. --
Fullstop (
talk) 18:39, 30 January 2009 (UTC):D
. One other one we might want to think about is yyyy-mm-ddThh:mm:ssZ, which is the output format from the API.
Happy‑
melon 19:44, 30 January 2009 (UTC)I don't know if this helps, but adding "0:00" to the start of a year forces #time to recognize it as a year instead of a time. For example, {{#time:Y|0:00 1999}}
= 1999. So, we should be able to make {{date|1999}}
= 1999. —
Remember the dot (
talk) 20:25, 1 February 2009 (UTC)
Trying to keep up with the latest crazy format crisis without string functions is doing my head in! Apparently "2007b
" is a common and accepted input to |date=
parameters of citation templates when using Harvard referencing. Clearly this should be returned unhandled, but it's currently not:
(
)I can't think of a way to test for this off the top of my head. Does anyone have any bright ideas? Happy‑ melon 21:00, 9 February 2009 (UTC)
I don't have the 15th edition of the Chicago Manual of Style, but according to a summary "Chicago style now prefers full dates American style, in month day, year format. " -- Gerry Ashton ( talk) 04:50, 10 February 2009 (UTC)
To return to the issue at hand, see here (or here). -- Fullstop ( talk) 06:16, 10 February 2009 (UTC)
I was updating a couple of heavily used templates to use {{ date}} and discovered that there is a limit to the number of times {{#time}} can be called in one page. I'm not sure if this limit is related to the recent server update or an unknown bug the ParserFuction software. -- Farix ( Talk) 15:40, 18 February 2009 (UTC)
{{
date}}
and the resultant 2,758 calls to #time are evidently not a problem.This template also exists at Commons, but the input requirements are different. I feel they should be the same so users that hop between the projects can use just one format. Please comment at Commons if interested. ~ ωαdεstεr16 «talk stalk» 05:02, 6 May 2009 (UTC)
How about having the template output include an
between day and month, so they aren't split by line breaks?
—WWoods (
talk) 14:25, 9 August 2009 (UTC)
{{#time:F j, Y}}
=> ok{{#time:j|{{#time:F j, Y}}}}
=> error{{#time:F" "j," "Y}}
? I'm guessing no. I tried it in the sandbox (
diff), and it works (checked the test cases as well), but I'm not sure how to test the nesting problem. --
Fru1tbat (
talk) 13:44, 7 July 2011 (UTC)
I can find no reference on the template page to "user" or "preferences". Does the {{date}} template take into account the preferences of a logged-in user? HWV258 21:09, 2 December 2009 (UTC)
User:Dinoguy1000/scripts/ISO date format unifier.js
. ---—
Gadget850 (Ed)
talk 12:47, 18 December 2009 (UTC)
Is it possible to modify this template to make it sortable under the table class wikitable sortable? -- 173.183.102.184 ( talk) 10:05, 4 January 2010 (UTC)
Template:Today has been nominated for merging with Template:Date. You are invited to comment on the discussion at the template's entry on the Templates for discussion page. Thank you. Set Sail For The Seven Seas 267° 58' 0" NET 17:51, 3 August 2010 (UTC)
{{
editprotected}}
Could a
templatey
administrator change all cases of {{{subst|}}}
to {{{|safesubst:}}}
? Thanks.
Set Sail For The Seven Seas
290° 27' 30" NET 19:21, 4 August 2010 (UTC)
This template does not appear to support BC dates. Because it might be useful, I have implented a BC date template for use with BC dates. But it would be better if you integrated it into this -- then my template would be useless if you did integrate! 'rdococ!' 11:58, 9 July 2011 (UTC) — Preceding unsigned comment added by Rdococ ( talk • contribs)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Your document says: "Recognized values for the second parameter are ... dmy gives d mmmm yyyy (eg 16 July). " The yyyy is missing. yyyy is similarly missing for any other second parameter value listed. It isn't just a document problem, because the template is used to generate the end of that document text, which is encoded as {{date||dmy}}. Therefore, the document is also wrong when it says "If no date is specified, the template emits the current date. For example, {{date}} produces 16 July 2011." You only get the year if the second parameter is also missing. If you specify the second parameter but not the first, the year disappears. Is that what you really wanted the template to do, or is there a software bug in the template itself, in addition to document problems? Art LaPella ( talk) 01:35, 16 July 2011 (UTC)
This template does not support the output of ~~~~~ which is 07:09, 10 May 2012 (UTC). I think this should be important to support especially for places were a last updated date may be written as ~~~~~ and then processed by the date template. -- ben_b ( talk) 07:09, 10 May 2012 (UTC)
I have added the parameter lnone
i.e. link but don't format. To make things easier I also added link
which does the same. Thus {{date|
xyz|lnone}}
& {{date|
xyz|link}}
are equivalent to [[
xyz]]
which seems pretty useless, right. So what was the point. It seems likely that a bot is going to go and clean up a lot of the residual mess left over from the bad old days of date linking. Here's a way to link years, decades, centuries, days of the week, etc. without having the bot delink them in the off chance that we'd actually want the link.
JIMp
talk·
cont 09:07, 2 July 2012 (UTC)
It is my understanding that the output of {{ date}} pays attention to user preferences, so that those who want dmy get it, and those that want mdy get that. Have I understood correctly? Reading above, it seems not. Apart then from standardising, it all seems a little pointless.
Following on, does the output take any account of user's local language? - January or janvier etc.
Either or both of these would be good for moving on with
John of Cromer in Philippines ( talk) mytime= Mon 16:22, wikitime= 08:22, 15 April 2013 (UTC)
I think I need to say this: without a default that takes into account user preferences for dates, I think this template is largely useless. It defaults to the dmy format. It should default to either the user date preference, or an article-wide preference, or the dmy/mdy format it was given in, or dmy otherwise, in that order.
Is there a way to expose user preferences from templates? Or to combine this with Template:Use mdy dates and friends through some sort of article-wide preference? Maybe using WP:Lua? Int21h ( talk) 06:53, 29 May 2013 (UTC)
I heartily second this request. I think it imperative, and a grave omission, that the template doean't already do this. I'd have thought it a fundamental requirement. As I indicated above, I also think it should take into account user's language preference (which basically is only month name). John of Cromer in transit ( talk) mytime= Wed 11:32, wikitime= 10:32, 29 May 2013 (UTC)
As of 16 September 2013 the template operates such that {{date}} returns the full date (dmy, day month year format), but there is no way to get the full date in mdy, month day year format. Since Wikipedia guidelines stress consistent use of dmy or mdy format within an article, this missing functionality results in unwanted inconsistencies. For example, see the lead paragraph in the Voyager 1 article.
I would like to propose an extension to the {{date}}template, as follows:
The use of the "df=y" and "mf=y" is consistent with other date templates (ex: {{birth date and year}}), and allow use of either dmy or mdy format, whichever is appropriate, while maintaining all existing functionality. Truthanado ( talk) 23:26, 16 September 2013 (UTC)
"{{date|{{date}}|mdy}}"
produces: "June 7, 2024". --
Michael Bednarek (
talk) 12:32, 17 September 2013 (UTC)Shouldn't mdy be the standard format? That is what is mostly used on Wikipedia I thought. -- Jwikiediting ( talk) 23:11, 9 October 2013 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
When I type {{date||mdy}}, it's not giving me the year, just the month and day (June 18). It doesn't do it in the documentation either, despite {{date|2006-08-04|mdy}} including the year. When the second parameter is left blank, there is no year produced. You instead have to type {{date|{{date}}|mdy}} to get it to display as documented. This should be corrected to reduce unnecessary clutter in the edit space. Ben Yes? 18:52, 18 June 2014 (UTC)
Is there a way to format dates that are input, without it defaultly providing the current date if none is provided. Alternatively, is there a template that performs such formatting? -- Zfish118 ( talk) 19:32, 15 July 2014 (UTC)
{{#if:…}}
can be used. --
Michael Bednarek (
talk) 03:37, 16 July 2014 (UTC)
{{cite web|url=http://example.com | title=example.com | accessdate={{#if:{{{1|}}}|{{date|{{{1}}}}}|}}|}} -- {{{1}}} being a user specified date. -- Zfish118 ( talk) 15:11, 16 July 2014 (UTC)
Since it is now 15:53, 5 July 2015 (UTC), the following is obviously untrue:
{{date}}
produces 27 June 2015.But if I actually enter {{date}}
, I get the correct result, currently 5 July 2015.
As live evidence, this paragraph ends with a live invocation of {{date}}
, which should be accurate whenever you read this: 7 June 2024
So these examples are confusing, to say the least. What's going on? Please {{Ping}} me to discuss.
-- Thnidu ( talk) 15:54, 5 July 2015 (UTC)
This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I'm doing a search and replace to remove inappropriate uses of {{
Start date}} for alternative dates in episode lists. {{
Date|2015-7-13|mdy}}
gives "July 13, 2015" as expected, but substituting it results in "13 July 2015".
nyuszika7h (
talk) 14:58, 11 September 2015 (UTC)
{{lc:}}
magic word not being substituted. I've
edited the sandbox version to fix that; substituting it gives {{
subst:Date/sandbox|2015-7-13|mdy}}
→ "July 13, 2015". Unfortunately the template is fully protected rather than template-protected, so an admin will be needed to either make the change to the real template or reduce the protection level.
SiBr4 (
talk) 16:47, 11 September 2015 (UTC)Should we use the date microformat for dates to allow parsers to get the semantics that it is a date? -- MartinThoma ( talk) 19:54, 22 March 2016 (UTC)
"This template should only be used internally in other templates." (It doesn't say why, but I'm okay with it.)
Despite this, {{date}} is used many times in many articles.
The easy way to clean up the mess should be substitution, which would replace each template invocation ({{date|2015-02-13|mdy}}) with its expansion (February 13, 2015) in the markup, upon saving.
Mass-replacing '''{{date''' with '''{{subst:date''' does not work inside <ref> tags. ( A bug reported since 2005.)
Mass-replacing '''{{date''' with '''{{[[Help:Substitution#The safesubst: modifier|safesubst]]:date''' works inside <ref> tags. - A876 ( talk) 07:51, 10 February 2018 (UTC)
It's used in the oldest people articles, it uses age as of 7 June 2024
{{
date}}
- 7 June 2024
I was seeing if all numeric can work, when I use DD/MM/YYYY, MM-DD-YYYY, MM.DD.YYYY, MM.DD.YY, MM-DD-YY, YY/MM/DD, YY.MM.DD, YYYY.MM.DD are all invalid, formats MM/DD/YYYY, DD-MM-YYYY, DD.MM.YYYY, YYYY-MM-DD, YYYY/MM/DD are all valid
input | {{date}} |
---|---|
{{date|05/31/2012}} | 31 May 2012 |
{{date|05-31-2012}} | 05-31-2012 gives me an error |
I normally use {{date|05/31/2012}} which doesn't give me any errors, I use slashes indicate MM/DD/YYYY and hyphens DD-MM-YYYY — Preceding unsigned comment added by 98.31.29.4 ( talk • contribs) 00:21, 24 July 2018 (UTC)
{{date|05/31/2012}} displays 31 May 2012
{{Date|2008 December 1|MDY}}
gives 2008 December 1 expected December 1, 2008, so what's the point?— Preceding
unsigned comment added by
2605:a000:1103:220f:cda:5ac6:a081:c425 (
talk •
contribs) 18:11, 25 July 2018 UTC (UTC)
Here's a way around this
{{date|{{YMD to ISO|2011 August 16}}|DMY}}
gives 16 August 2011
{{date|{{YMD to ISO|2011 August 16}}|MDY}}
gives August 16, 2011
{{date|{{YMD to ISO|2011 August 16}}|ISO}}
gives 2011-08-16
{{date|05/31/2012}} gives 31 May 2012
{{date|5/31/2012}} gives 31 May 2012
{{date|05/31/12}} gives 31 May 2012
{{date|5/31/12}} gives 31 May 2012
— Preceding unsigned comment added by 2605:a000:1103:220f:b16b:1989:746e:84ab ( talk • contribs) 00:54, 28 July 2018 (UTC)
So for an example
{{date|06/04/2016|ISO}} gives me 2016-06-04 which works perfectly
{{date|Jun 4|ISO}} gives me June 4 gives me the same format as {{date|Jun 4|MDY}} and {{date|Jun 4|YMD}}
So help me is there anyway to display September 2 as --09-02 for the ISO format? — Preceding unsigned comment added by 2605:a000:1103:c3:399a:138a:ed29:909c ( talk • contribs) 21:23, 2 September 2018 (UTC)
09-02
or whatever you want. However, that is very unlikely to be desirable.
Johnuniq (
talk) 23:25, 2 September 2018 (UTC)
Here's what can solve the problem
06-07, displays the current date
09-02
Date with year: 2024-06-07
Date without year: 06-07
— Preceding
unsigned comment added by
2600:1:b1a6:97c5:b53a:2108:a250:3651 (
talk •
contribs) 12:56, 24 September 2018 (UTC)
{{date||ISO}} will input the format as Month DD, why?
Yes, the current 2004 version of ISO 8601 does not permit omitting the year from a date, but this template will supposedly produce an ISO output when the year is missing. — Preceding unsigned comment added by 2600:1:91B0:EF43:2177:756:393F:B479 ( talk) 19:06, 7 December 2018 (UTC)
I tried displaying {{date|31/05/2012}} to be 31/05/2012 gives an error but {{date|05/31/2012}} gives 31 May 2012
When slashes are interpreted they are in mm/dd/yyyy — Preceding unsigned comment added by 2600:1:b1a6:97c5:b53a:2108:a250:3651 ( talk • contribs) 12:56, 24 September 2018 (UTC)
The docs say "This template should only be used internally in other templates." Does anyone know why templates would have this embedded template, and not use a plain-text date? -- Green C 18:31, 3 January 2019 (UTC)
This template is probably best used as a way of standardizing the appearance of all dates in an article, including those in citation templates and infoboxes.
This template is probably best used internally in other templates.
This template should only be used internally in other templates.
According to the documentation, {{date|Aug 4|ISO}} should output --08-04
; instead, it outputs August 4
, which isn't even a valid ISO string.
Conscious Code (
talk) 21:02, 19 January 2019 (UTC)
Well on Google Sheets if no date is specified is the number 0 which is 30 December 1899, but on this if no date has been specified it will display today's date.-- 2605:A000:1103:45:BC1C:3F06:D44C:C550 ( talk) 18:56, 9 February 2019 (UTC)
How can we force the date output have an abbreviated month (e.g. 15 Mar 2019) like what
{{MONTHABBREV}}
does? There should be an optional parameter like disp=abbr
.–
Sanglahi86 (
talk) 18:21, 14 March 2019 (UTC)
{{#time:j M Y|March 15, 2019}}
reformats a date to that format, or {{#time:j M Y}}
shows the current date in that format.
Frietjes (
talk) 16:52, 18 March 2019 (UTC)
For the phrase "ISO 8601 does not permit omitting from the year", is there agreement that the extraneous "from" can be removed?
Martin Kealey (
talk) 03:59, 7 April 2019 (UTC)
Is there a template which can be used to automatically add dates and find the combined age?
The specific use case I'm looking at is: in the US political system, judges are eligible for a kind of semi-retirement called 'senior status' once their age > 65 and their age + their number of years as a judge = 80. (So, an 80-year old judge would always be eligible for senior status, a 70-year old judge would only be eligible if he'd served as a judge for at least 10 years, a 65-year old judge would only be eligible if he'd served as a judge for at least 15 years, and a 60-year old judge would not be eligible). I'm experimenting (right now just on my sandbox page) with adding a 'Senior Status eligible?' column to the lists of judges on the various courts pages, but keeping that maintained manually on the hundred+ court pages wouldn't be tractable.
What I'm hoping is for there to be a template where I could put in multiple dates and have Wikipedia calculate their combined age. So if one judge was born exactly 65 years ago, and that judge started judicial service exactly 10 years ago, I could enter both those dates into the template and have the template say something like 'combined age 75 years', which I could then use to sort the judges and indicate those who are eligible for senior status.
Does a template like that exist?
Thanks! AaronCanton ( talk) 02:03, 21 November 2019 (UTC)
I'm concerned about the use of calculating something like senior status, rather than updating it manually. It's entirely possible that a judge dies before reaching senior status. It's also entirely possible that the Wikipedia article about the judge will not be updated to reflect the death. If a calculation is done, Wikipedia will appear to affirmatively state that the judge reached senior status when (s)he never did. Jc3s5h ( talk) 17:31, 25 November 2019 (UTC)
For example, if it is nested in a template that feeds it 2021-02-03
, can I tell it to ignore the year and give me February 3
as an output? —
Arctic Gnome (
talk •
contribs) 01:31, 21 January 2021 (UTC)
{{extract|3 Feb 2021|show=%{monthname} %{day} }}
→ February 3{{extract|2021-2-3|show=%{monthname} %{day} }}
→ February 3{{extract|2021-2-3|show=%B %-d}}
→ February 3Documentation tells that there shall be a significant difference in presentation of
{{date}}
{{date|}}
Please note:
1
has suggested state in VisualEditor. That does mean that an empty field will be created always if this template is touched by VE.Greetings -- PerfektesChaos ( talk) 15:12, 19 March 2021 (UTC)
|1=
does not exist. In the second instance, |1=
exists but is empty. –
Jonesey95 (
talk) 18:37, 27 June 2021 (UTC)This is not directed just towards this template, but to all templates that have a date field. Take the following six examples:
{{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help)Of these, only the first and third parse, even though it is immediately clear to the reader what dates are intended by the rest. This becomes a problem where dates formatted with these variations are copied from a source website. Putting aside MOS issues, can't we make templates recognize that 05 in any "day" parameter means 5, and that in the month parameter, April = Apr. = Apr = APR = APRIL? We can always have a bot come through and conform them to the preferred style later on. BD2412 T 05:12, 27 April 2022 (UTC)
I would add, by the way, that this should apply to different month shortenings, as with:
{{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{
cite news}}
: Check date values in: |date=
(
help){{date|1948 18 January|MDY}}
outputs as January 18
without the year instead of January 18, 1948
Even with YDM
parameter isn't recognized, for an example {{date|January 18, 1948|YDM}}
outputs as 18 January 1948
(expected 1948 18 January
) as if it we're to be treated as DMY
format
So using
template, {{
FULLDATE}}
{{FULLDATE|type=mdy|time=1948 18 January}}
outputs as January 18, 2024
as the current year (expected January 18, 1948
)
How is YDM
parameter not an option?, it's treated like if it were to be DMY
-- 98.31.29.4 ( talk) 21:31, 3 June 2022 (UTC)
YDM
input or output would need to be examined so any format like where {{date|2=YDM}}
outputs as 2024 7 June
{{date|January 18, 1948|YDM}}
outputs as 1948 18 January
{{date|1948 18 January}}
outputs as 18 January
with the year missing even when using{{FULLDATE|type=dmy|time=1948 18 January}}
outputs as 18 January 2024
with the {{
Currentyear}}
instead of 1948
, so YDM
doesn't return unalternated as an input like how YMD
does but it does not provide the year though.
2603:6011:E00:4C41:0:0:0:100F (
talk) 02:54, 18 March 2024 (UTC)Could we please allow an option of showing abbreviated months, like Sept. 9, 2022
? This would be useful in tables and infoboxes where space is limited. —
Arctic Gnome (
talk •
contribs) 15:08, 9 September 2022 (UTC)
Sep 9, 2022
" would be valid, though. I don't see a way to generate that format using this template, however. –
Jonesey95 (
talk) 18:23, 9 September 2022 (UTC)
|mdy = F j, Y
. Could that be followed by a line reading |mdy-short = M j, Y
? —
Arctic Gnome (
talk •
contribs) 19:29, 9 September 2022 (UTC)I would like to know how to automatically age a date and age template in Portuguese, case in point: Predefinição:Presidente da República Portuguesa por idade, I've tried several and failed, this type of parameter works in English templates (example: Template:United States presidents by age).
Best – Ser.Silv. ( talk) 09:35, 26 October 2022 (UTC)
The data template needs to emit the invisible <time></time>
HTML block around the generated date, which is used to communicate the date to accessibility software like screen readers or software for the visually impaired.
Chrome-based web browsers have the ability to localize the date in time blocks to the user's specified language or display preference. Users of these browsers can set their date display preference in the browser's language settings.
Additionally, The time block would allow search engines to parse dates with better precision, allowing them to better suggest Wikipedia articles. — Preceding unsigned comment added by MatthewUtzig ( talk • contribs) 23:12, 7 April 2023 (UTC)
time
is an allowed HTML tag in MediaWiki, there is no reason to not include it. ―
Justin (koavf)❤
T☮
C☺
M☯ 13:17, 8 April 2023 (UTC)
Is there a way with this template (or a similar template) to avoid the default shift to dmy format? But still have the date change if Template:Use dmy dates is used on the page? Rjjiii ( talk) 13:53, 28 October 2023 (UTC)