Jump to content

Template talk:Hansard

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Hansard/doc)

Date error

[edit]

Hello, there is a problem with the date processing of this template as it adds an extra zero.

{{hansard|1927/may/31/peerages-in-abeyance|house=lords|access-date=30 December 2015}}
produces
"Peerages in Abeyance (1927)". Parliamentary Debates (Hansard). House of Lords. 31 May 1927. Retrieved 30 December 2015.

Keith D (talk) 20:01, 7 October 2021 (UTC)[reply]

@Keith D: Looks like the change made by GKFX in April to add the "#invoke:ustring|gsub" to the date format has recently caused it to format oddly. I have reverted back to the "trim leading" template as a corrective measure. GKFX may wish to see why their edit a few months back now breaks the date format. Bungle (talkcontribs) 20:13, 7 October 2021 (UTC)[reply]
Many thanks for the ping. Nothing wrong with the April edit - actually I broke Module:Ustring earlier this evening (see fix) which is the cause of the problem. Lua treats the "gsub" function differently with brackets around it (in an inexplicable bit of language design!) and I accidentally removed them when trying to make it easier to use. User:GKFXtalk 20:29, 7 October 2021 (UTC)[reply]
Thanks for the quick resolution. I didn't suggest the April edit was wrong per-se (as it's been fine since), but clearly related to the change in syntax which you note you had edited directly not long ago, so I guess there was an easy explanation. Don't worry, mistakes happen! Bungle (talkcontribs) 20:37, 7 October 2021 (UTC)[reply]
Thanks for fixing the problem. I guessed it had to be a recent change, or it would have been picked up before now. Keith D (talk) 22:25, 7 October 2021 (UTC)[reply]