Template:Canada elections/federal election/doc

,, , and are intended to be used in the Canadian federal election navigational boxes, (for example Template:Canadian federal election, 2011A,) however they may have other uses.

Usage

 * takes one parameter, a year between 1867 and 2019, and produces the election number
 * takes one parameter, a number between 1 and 43, and produces the year of the election
 * takes one parameter, an election year, if present in the pagename, a link to that page on the previous election will be produced
 * takes one parameter, an election year, if present in the pagename, a link to that page on the following election will be produced

Election numbers and years
produces
 * Year to number.

produces produces
 * Number to year.

produces produces
 * There and back.

produces

produces

Invalid parameters

 * Numbers out of range
 * Text
 * Text
 * Text
 * Text
 * Text

Linking to articles ending in "Canadian federal election"
produces
 * On Progressive Conservative Party of Canada candidates, 1979 Canadian federal election.

produces produces
 * On Liberal Party of Canada candidates, 1980 Canadian federal election.

produces

Linking to Parliaments
produces
 * On 35th Canadian Parliament.

produces

produces

produces

Linking to articles ending in the year
produces
 * On Canadian federal election, 2000.

produces produces
 * On Results of the Canadian federal election, 2004.

produces produces
 * On Timeline of the Canadian federal election, 2006.

produces

Linking to pages outside the mainspace
produces
 * On Template:Canadian federal election, 2008A.

produces produces
 * On Template:Canadian federal election, 2011.

produces produces
 * On User:Example/Target ridings in 2015/NDP.

produces looking for the existence of 2011er:Example/Target ridings in the Canadian federal election, 2015.
 * Because off-mainspace is limited to 50 characters, User:Example/Target ridings in the Canadian federal election, 2015 will result in

Invalid combinations
on Canadian federal election, 1979
 * Years do not match.

on Canadian federal election, 1980 on Conservative Party of Canada candidates, 2004 Canadian federal election
 * Page does not exist.

on Progressive Conservative Party of Canada candidates, 2000 Canadian federal election on Paul Martin
 * No year in page name.

on Stephen Harper on Canadian federal by-elections, 2009
 * Year out of range.

on Canadian federal election, 2014