Template:Railway stations in countryname opened or closed in YYYY category header/doc

To make a category of the form "Railway stations in countryname opened in YYYY" or "Railway stations in countryname closed in YYYY", where "countryname" is the name of a country and "YYYY" is a 4-digit year

e.g.
 * Category:Railway stations in China opened in 1912
 * Category:Railway stations in the United States opened in 1912
 * Category:Railway stations in Australia closed in 1958

The template detects which format is being used, and adjusts accordingly.

Usage
No parameters are needed, but an optional parameter is available: OtherCountry

Optional parentcountry parameter
Use of this parameter causes the category to be parented in "Category:Railway stations in OtherCountry opened in YYYY", instead of the usual "Category:Railway stations opened in YYYY"

For example, in Category:Railway stations in Hong Kong opened in 2003, the template is used as follows:

This causes that page to be parented in Category:Railway stations in China opened in 2003, rather than in Category:Railway stations opened in 2003

Use of this parameter is monitored by a tracking category:


 * Category:Railway stations in countryname opened or closed template with parentcountry parameter (population: )

Redirects

 * Railway stations in countryname opened in YYYY category header
 * Railway stations in countryname closed in YYYY category header