Module talk:Time: Difference between revisions

Content deleted Content added
Line 38:
== Template-protected edit request on 8 August 2018 ==
 
{{edit template-protected|Module:Time|answered=noyes}}<syntaxhighlight lang=Lua>
local function get_utc_offset_hour (timezone)
local hours;
Line 90:
return string.format ('[[UTC%s%s:%s]]', utc_offset_sign, utc_offset_hour, utc_offset_min);
 
end</syntaxhighlight>
end
 
* These edits add a function which allows the module to output the UTC offset of a timezone. The output would be able to replace many templates and would allow [[Template:Infobox time zone]] to work more reliably. I've done testing to make sure both positive and negative UTC offsets work and function time still works [[User:BrandonXLF/sandbox2|here]]. — [[User:BrandonXLF|<span style="outline: 3px double blue;color:lightcyan;background-color:black;'>&nbsp;'''''BrandonXLF'''''&nbsp;</span>]]&nbsp;&nbsp;[[User talk:BrandonXLF|<sup>(t@lk)</sup>]]&nbsp;<span style="color:black"><sup>([[Template:Ping|ping back]])</sup></span> 15:34, 8 August 2018 (UTC)
:I added {{tag|syntaxhighlight}} to make your code more readable. How does this change make {{tlx|Infobox time zone}} {{tq|work more reliably}}? If that template is 'unreliable', shouldn't fixes be applied there? Why is your proposed code so complex? Can't it be made simpler?
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 16:04, 8 August 2018 (UTC)