Template talk:Photographs taken on MM-DD navbox

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Directing single digit days to appropriate category

[edit]

@Pigsonthewing: - I am by no means well versed in template syntax, but could something like this not work?

[[Category:{{#ifexpr: {{{2}}} < 10 | {{#expr:{{{2}}}}} | {{{2}}} }} {{#switch:{{{1}}}|1=January|2=February|3=March|4=April|5=May|6=June|7=July|8=August|9=September|10=October|11=November|12=December}}]]

--Askeuhd (talk) 14:11, 1 June 2022 (UTC)[reply]

@Askeuhd: That seems to do the job. Thank you. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:39, 1 June 2022 (UTC)[reply]
@Pigsonthewing: my pleasure, I am happy to see it worked. Askeuhd (talk) 18:47, 1 June 2022 (UTC)[reply]