This template is intended to be used in year-based categories where the year is the first thing in the category name (for example, 2008 in Canadian music or 1979 disasters). It creates a "timeline" style table of links to categories for adjacent years before or after it in the same decade (see example below).
((Year by category
| m =
| c =
| d =
| y =
| cat =
| in =
| parent =
| subcat =
| sortkey =
))
The first 5 parameters split the name of the category page receiving the template into separate pieces. They are used to form the timeline links.
The next parameter can be used to link to a "main article" for the category.
The rest of the parameters are used to categorize the page containing the template.
Note that both the "parent" and "subcat" parameters are referring to parent categories of the category page the template is being placed on.
When placed on the page Category:2008 in Canadian music:
((Year by category
| m = 2
| c = 0
| d = 0
| y = 8
| cat = in Canadian music
| in = Canadian music
| parent = Canadian music by year
| subcat = 2008 in Canada
| sortkey = Music
))
When placed on the page Category:1999 disasters:
((Year by category
| m = 1
| c = 9
| d = 7
| y = 9
| cat = disasters
| parent = 20th-century disasters
))