Hi,
I'm creating my own custom version of Wikimedia Common's Information
template <https://commons.wikimedia.org/wiki/Template:Information> for my
local wiki. My local wiki uses D M YYYY dates (where `M` is month name).
The issue is that I commonly copy files across from commons to my wiki via
Pywikibot (namely its `imagetransfer.py` script) and they commonly use ISO
dates, so I want to make my information template check whether the date
field is a time or not, or whether it contains a time, then if it is a time
or contains a time send the time given through the `{{#time:j F Y}}` parser
to ensure it is in D M YYYY format, but I do not know how to do this. Can
someone, per chance, help me with this? Even if you could tell me how to
check, in wikitext, using perhaps a parser function, whether a variable is
even a time that would be a help. Although, if someone knows how to
separate parts of a date field into time and comments and then send the
time part through this parser function I will be even more grateful.
Thanks for your time,
Brenton
Show replies by date