Content deleted Content added
→abbr=on violates MOS: comment |
m Archiving 2 discussion(s) to Module talk:Age/Archive 1) (bot |
||
(17 intermediate revisions by 6 users not shown) | |||
Line 10:
| minthreadsleft = 4
}}
:::Thanks, template data is over my head. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 23:02, 31 March 2022 (UTC)▼
::[[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 03:59, 9 March 2023 (UTC)▼
== Example for using age_generic from another module ==
Line 96 ⟶ 65:
:(came from village pump) I'm not someone involved with the relevant articles, but I do agree that "13 d 12 h 35 min" looks very odd, "13d 12h 35m" is (to me) more natural (due to the consistent abbreviations) and easier to read. The latter point is because the extra spaces break up the content into 6 separate chunks rather than the intended 3 and so I have actively work to associate the abbreviation with the number. This is even worse when there are single-digit values "4 d 6 h 3 m" is bordering on gobledook while "4d 6h 3m" is coherent and understandable at a glance. I can understand a preference for "min" over "m" when used in isolation (e.g. "16m" is less clear than "16 min") but when used with hours and/or seconds the extra two letters add nothing. [[User:Thryduulf|Thryduulf]] ([[User talk:Thryduulf|talk]]) 01:03, 1 August 2024 (UTC)
::Same here. And I agree. In this kind of complex abbreviation, the MOS guidelines might not lead to the best solution. It might be good to document at the MOS an acceptable alternative style for such multi-part integer-based quantities; they don't necessarily need to be done the same way as typical values and units (e.g. 3.6 V). [[User:Dicklyon|Dicklyon]] ([[User talk:Dicklyon|talk]]) 04:38, 1 August 2024 (UTC)
::Reviewing the table with the mixed-units example in the MOS, I see that time duration is the only 3-part mixed unit case they talk about, and the example "1 h 30 min 7 s" just looks odd, compared to most of the others (but not as odd as the two-part "1 US fl pt 8 US fl oz", which I hope we never see anywhere). So, instead of asking here, I'd say take it up at MOS, and see if you can get "1h 30m 7s" approved as an OK alternative, especially given that such forms may be in wide use already. [[User:Dicklyon|Dicklyon]] ([[User talk:Dicklyon|talk]]) 04:55, 1 August 2024 (UTC)
:I saw the note at the village pump. Johnbod's example:
:* 84d 7h 52m
:* 84 d 7 h 52 m
:is the the key bit of information for me. The first is better because I can figure out what it means at a glance. The one with the spaces looks like someone's notes for a [[Bingo (American version)]] game. I'm sure that either would make sense in context, and I'm sure I could figure it out, but the first is more obvious.
:Also, if this is getting used in infoboxes or data tables, then the very small savings in the width might be wanted. [[User:WhatamIdoing|WhatamIdoing]] ([[User talk:WhatamIdoing|talk]]) 03:23, 3 August 2024 (UTC)
There are two issues here: spaces or no spaces between numbers and abbreviations, and whether the abbreviation for minute(s) should be "m" or "min". On the latter question, the longer abbreviation is asserted to be required due to ambiguity with "month", however in practice that only exists when it it appears alone - when accompanied by any other unit of time (hours, seconds, days, years) both are unambiguous due to context. [[User:Thryduulf|Thryduulf]] ([[User talk:Thryduulf|talk]]) 10:07, 3 August 2024 (UTC)
Although I'm a bit late to the party, I fully agree with remarks by {{u|Johnuniq}}, {{u|WhatamIdoing}}, {{u|Thryduulf}}, {{u|Dicklyon}} and {{u|Huntster}}. The abbreviated format "15d 8h 34m" is more legible than the MOS-derived "15 d 8 h 34 min", especially in the context of long lists of spaceflights or other events. Let's keep this "exception" the rule here. — [[User:JFG|JFG]] <sup>[[User talk:JFG|talk]]</sup> 04:34, 10 September 2024 (UTC)
== df and mf with bad values ==
@[[User:Johnuniq|Johnuniq]] could you please add usages of {{para|df}} or {{para|mf}} with any value other than "yes" or "y" to [[:Category:Age error]]? I'm looking at [https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=Birth+date+and+age the report] and there are many errors with df that are left uncaught. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 09:06, 6 April 2025 (UTC)
:I'm afraid cruft like that accumulates when parameters are not closely checked. The module copied what the templates did because I didn't want to create too much fuss when the module was introduced. However, it's stable and if you're able to attack the maintenance I can implement your change. I'll do that in the next few days and will ping you when done. If I disappear, please remind me. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 09:44, 6 April 2025 (UTC)
::Yes, I can do that, that isn't a problem. I've been working on cleaning templates that I've worked at with {{tl|Start date}} and others in which I've implemented [[Module:Date time]] to handle validation. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 09:47, 6 April 2025 (UTC)
{{ping|Gonnym}} I'm working on this and it's finished apart from checking and thinking about the following question. The function <code>yes()</code> accepts parameters like <code>fix=yes</code> but not <code>fix=YES</code> or <code>fix=Yes</code>. That was my choice because parameters like that were introduced with Module:Age and so consistent parameter values could be required. However, lots of articles use <code>df=Y</code> or <code>df=Yes</code> etc. I would prefer to avoid lower-casing the value because wikitext like <code>df=yEs</code> is ugly and I don't think it should be accepted. Also, not lower-casing is more efficient in the module. So, I'm wondering what to accept. My plan currently accepts df=y, df=yes, df=Y, df=YES. Should we try that and see what happens? My error check only examines the <code>df</code> parameter. Any junk can still be entered for <code>mf</code> because it is ignored as it is the default at enwiki. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 07:41, 10 April 2025 (UTC)
:{{ping|Gonnym}} My code is in the sandbox for testing. As mentioned, <code>mf</code> is ignored because it is the default here. Valid <code>df</code> values are y, yes, Y, Yes, YES. The error message in the following examples would also include [[:Category:Age error]] if in an article.
:*<code><nowiki>{{Birth date and age/sandbox|1 Feb 1988}}</nowiki></code> → {{Birth date and age/sandbox|1 Feb 1988}}
:*<code><nowiki>{{Birth date and age/sandbox|1 Feb 1988|mf=yeah}}</nowiki></code> → {{Birth date and age/sandbox|1 Feb 1988|mf=yeah}}
:*<code><nowiki>{{Birth date and age/sandbox|1 Feb 1988|df=}}</nowiki></code> → {{Birth date and age/sandbox|1 Feb 1988|df=}}
:*<code><nowiki>{{Birth date and age/sandbox|1 Feb 1988|df=Yes}}</nowiki></code> → {{Birth date and age/sandbox|1 Feb 1988|df=Yes}}
:*<code><nowiki>{{Birth date and age/sandbox|1 Feb 1988|df=yeah}}</nowiki></code> → {{Birth date and age/sandbox|1 Feb 1988|df=yeah}}
{{#invoke:convert/tester|compare|Age|prefix=:*}}
:Please have a look. I can update the main module when ready. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 06:26, 12 April 2025 (UTC)
▲::
:::Around 160 pages fixed so far. Unrelated to the above changes, [[Opera Mini]] and [[Tarbha Wale Baba]] are the only errors left which I can't fix. Tarbha Wale Baba does not seem like an error, as the dates are what the article says they are. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 08:45, 15 April 2025 (UTC)
::::Thanks, that's great. I saw those two pages earlier. Dealing with the second will be interesting because it's obvious nonsense (lived more than 150 years). I'm busy for a few days and will look later. They are not really our problem. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 08:56, 15 April 2025 (UTC)
== Birth year and age ==
Could the module be modified so that the age can be calculated without the specific day? Currently we have {{tl|Birth year and age}} which does it, but {{tl|Birth date and age}} which can't, but there really is no reason to have these two be different templates. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 08:20, 16 April 2025 (UTC)
:Too much turmoil here at the moment for me to think about that. Meanwhile, a factor to consider is that the templates have very different outputs. Following shows two examples from [[Special:ExpandTemplates]]:<source lang=moin>
{{Birth year and age|1970}}
1970 (age 54–55)
{{Birth date and age|1 Feb 1970}}
<span style="display:none"> (<span class="bday">1970-02-01</span>) </span>February 1, 1970<span class="noprint ForceAgeToShow"> (age 55)</span>
▲
::The second one is better as it produces the hCalendar. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 09:25, 16 April 2025 (UTC)
|