Template talk:Time/doc

12PM and 12AM
This template is inconsistent with wv:tdf. We don't use "12AM" or "12PM" in Wikivoyage because they are ambiguous. Many people use 12AM to mean noon, so a template that gives the result "12PM (noon)" will be confusing for or just look stupid to those who read 12PM to mean midnight.

There are arguments on both sides for whether 12PM means noon or midnight, but that misses the point that there are readers on both sides of the argument. We should provide information in an unambiguous way by using "noon" and "midnight".

Can anyone fix this? Ground Zero (talk) 13:37, 19 February 2022 (UTC)


 * Correct me if I misunderstood, but this edit should have fixed this issue. The template now outputs simply "noon" or "midnight" instead of 12AM/PM with said clarifications. -- Wauteurz (talk) 16:23, 19 February 2022 (UTC)
 * thank you. I think that fixed it. Have a good weekend. Ground Zero (talk) 17:08, 19 February 2022 (UTC)
 * , the problem is still there. The "midnight" in June 29, 2024 produces the error message. On the other hand June 29, 2024 does not produce such a message.
 * June 29, 2024 : June 29, 2024
 * June 29, 2024 : June 29, 2024
 * Apart from the red message, the mouse-over event displays correct info. --FredTC (talk) 10:34, 20 February 2022 (UTC)
 * All you have to do is to enter June 29, 2024 and it'll produce June 29, 2024 with the correct output. Same with noon – type June 29, 2024 and you get June 29, 2024. SHB2000 (talk &#124; contribs &#124; meta.wikimedia) 10:40, 20 February 2022 (UTC)
 * In the edit summary of this edit, Ground Zero indicates the preference for "midnight" over "12AM", mentioning WV:TDF. --FredTC (talk) 11:25, 20 February 2022 (UTC)
 * Yes, but it's only the output that has to comply with wv:tdf. SHB2000 (talk &#124; contribs &#124; meta.wikimedia) 11:31, 20 February 2022 (UTC)
 * Not to throw shade, but that's on GZ then. Time is made to output "midnight" or "noon", not to take or understand it as input. It does convert them when used as input, which makes "noon" acceptable as per your examples above, but it is not made to support them. "noon" being accepted as input is more of a fluke than it is design.
 * The way the template works, is through the ParserFunctions extension, which forces "h" to be the parameter used for the hour in 12-hour format. It therefore converts "midnight" into something it thinks it can make sense of (midnig:t), which breaks the template altogether. "noon" simply works because none of those letters get used in the conversion. It could likely be fixed by altering the template to use 24-hour instead of 12-hour as its basis for conversion, but I am not certain that that'd be easy. I wouldn't want to burn my own hands on it, as my experience and understanding of ParserFunctions pretty much ends here. The easiest fix by far is to use the template as it is made to work, and input the numerical timestamps it expects and make a note of that on the template's documentation page. -- Wauteurz (talk) 13:23, 20 February 2022 (UTC)
 * I have added this note:
 * ""Midnight" is not a valid input for the template. Use "00:00" instead. It will produce "midnight" as the output."
 * Not a perfect solution, but unless someone can figure out a way around it, it will have to do. Ground Zero (talk) 14:05, 20 February 2022 (UTC)