Difference between revisions of "Module:SignatureDateConvert"
MyWikiBiz, Author Your Legacy — Thursday September 11, 2025
Jump to navigationJump to search (Pywikibot 6.4.0) |
(No difference)
|
Latest revision as of 06:01, 16 July 2021
Usage
This module is used for converting dates that are in signatures to YYYY-MM-DD, so they can be used sort-ably in tables.
Example
{{#invoke:SignatureDateConvert|sigConv|timestamp=02:19, 7 March 2021 (UTC)}}
2021-03-7
Current uses
See Template:T.
local p = {} function p.sigConv(frame) s = frame.args.timestamp r="(%d+):(%d+), (%d+) (%a+) (%d+) %(UTC%)" hour,min,day,month,year=s:match(r) MON={January="01",February="02",March="03",April="04",May="05",June="06",July="07",August="08",September="09",October="10",November="11",December="12"} month=MON[month] return year .. "-" .. month .. "-" .. day end return p