Template talk:YMDcat

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

days by year[edit]

Hello, this template needs to be modified to handle the concept of "days by year". i.e.: category:1 January, by year. - Lx 121 (talk) 03:38, 23 July 2013 (UTC)[reply]

Documentation[edit]

Can we have some documentation for this template, please explaining how it should be used. Mitch Ames (talk) 13:03, 31 December 2013 (UTC)[reply]

User:Morio, please create documentation (and categorize) for this template! --Kaganer (talk) 20:46, 1 July 2014 (UTC)[reply]

Done. If further edit is required, please let me know.--Morio (talk) 12:01, 2 July 2014 (UTC)[reply]

Bug fix[edit]

Altered this template slightly, so that when adding to a category like "5 January", using a leading zero in the parameter (i.e. '05') does not cause miscategorization. This makes the template behavior match the documentation, which specifically says that having a leading zero in that parameter works, and removed a potential cause of the creation of duplicate categories. I made this work by using the MediaWiki math function 'round' to truncate the parameter to zero digits, which returns the correct value even though it's kind of a 'misuse' of the function. This will cause an error to be thrown if someone attempts to use letters in the date field, but that shouldn't be an issue, lol.Revent (talk) 07:54, 11 December 2014 (UTC)[reply]