Module:Cat year: Difference between revisions

3 bytes removed ,  17 April 2020
no edit summary
No edit summary
No edit summary
Line 17: Line 17:


-- Categorize the first release as just 'song' or 'album', etc.
-- Categorize the first release as just 'song' or 'album', etc.
local first_year = string.match( date_str, "%d%d%d%d" )[0]
local first_year = string.match( date_str, "%d%d%d%d" )
if first_year then
if first_year then
date_str = date_str .. '[[Category:' .. first_year .. ' ' .. 'songs]]'
date_str = date_str .. '[[Category:' .. first_year .. ' ' .. 'songs]]'