Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
|||
Line 120:
{{edit template-protected|Module:Time|answered=yes}}
replace p.time with{{collapse top}}
<syntaxhighlight lang=Lua>
function p.time (frame)
Line 248:
end
</syntaxhighlight>
{{collapse bottom}}
What it does is add parameters timeonly and dateonly, which allows the module to output the time or date of an timezone. This would be very helpful in the userspace and in some templates.
— [[User:BrandonXLF|<span style="outline: 3px double blue;color:lightcyan;background-color:black;'> '''''BrandonXLF''''' </span>]] [[User talk:BrandonXLF|<sup>(t@lk)</sup>]] <span style="color:black"><sup>([[Template:Ping|ping back]])</sup></span> 20:46, 9 August 2018 (UTC)
Line 257 ⟶ 258:
:*<code><nowiki>{{#invoke:time/sandbox|time|dateonly=yes|df=iso}}</nowiki></code> → {{#invoke:time/sandbox|time|dateonly=yes|df=iso}}
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 21:13, 9 August 2018 (UTC)
::{{ping|Trappist the monk}} Fixed the issues from above:{{collapse top}}
<syntaxhighlight lang=Lua>
function p.time (frame)
Line 391 ⟶ 392:
end
</syntaxhighlight>
{{collapse bottom}}
— [[User:BrandonXLF|<span style="outline: 3px double blue;color:lightcyan;background-color:black;'> '''''BrandonXLF''''' </span>]] [[User talk:BrandonXLF|<sup>(t@lk)</sup>]] <span style="color:black"><sup>([[Template:Ping|ping back]])</sup></span> 01:12, 10 August 2018 (UTC)
:You didn't actually. I've rewritten that section of the code so that it is simpler. Here are some results:
:time & date:
Line 419 ⟶ 420:
:—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 12:43, 10 August 2018 (UTC)
::{{ping|Trappist the monk}} That works too. I think that refresh link can be annoying as some need it in different places so I added {{para|refresh}} to the sandbox
::*{{time/sandbox|MST|refresh=yes|df=dmy12}} refresh=yes
::*{{time/sandbox|MST|refresh=no|df=dmy12}} refresh=no
::*{{time/sandbox|MST|df=dmy12}}
::— [[User:BrandonXLF|<span style="outline: 3px double blue;color:lightcyan;background-color:black;'> '''''BrandonXLF''''' </span>]] [[User talk:BrandonXLF|<sup>(t@lk)</sup>]] <span style="color:black"><sup>([[Template:Ping|ping back]])</sup></span> 13:37, 10 August 2018 (UTC)
:::Tweaked that a bit. Why have you chosen to omitted the timezone abbreviation when {{para|dateonly|yes}} and {{para|timeonly|yes}}? It seems to me that the default rendering must include the timezone abbreviation else readers don't know where the time/date applies.
:::—[[User:Trappist the monk|Trappist the monk]] ([[User talk:Trappist the monk|talk]]) 15:08, 10 August 2018 (UTC)
|