See something you'd like to change or add, but you've never edited an open encyclopædia before? This overview was written to help absolute beginners get started.

Template:Railway date

From A Storehouse of Knowledge
Jump to: navigation, search

Template: Railway date
Use on/in Articles about railways.
Use for A row of a table of dates
Category template applies to page (none)
Template Parameters
(See Template style manual).
Name Purpose Required? SMW property Comment
1 Category Yes See Categories, below.
s Station or section No
dt Date No See Dates, below.
d Date of month No See Dates, below.
m Month No See Dates, below.
y Year No See Dates, below.
e Event Yes
date prefix Prefix to date No See Dates, below.
date suffix Suffix to date No See Dates, below.

This template supplies one row of a {{Railway date table}}. Multiple uses of this macro comprise the one parameter used by that macro.

Contents

Categories

The first unnamed parameter is the category, to allow the table to be sorted by type of event. The following categories are recommended:

  • Line—any event that concerned the infrastructure of line as a whole, or of a section of the line.
  • Station—any event that concerned a particular station or other location on the line.
  • Service—any event that concerned services operated on the line.
  • Locomotives—any event that concerned locomotives operated on the line. This would typically be used only on article about a small railway.
  • Rolling stock—As for Locomotives, but for rolling stock.
  • Ownership—Any event that related to ownership of the line or operating company.

Dates

The table caters for incomplete, partial, or uncertain dates. However, in order to make the table sortable by date, dates need to be supplied in particular formats. There are two alternatives for supplying dates:

  1. Supply the date as a whole, using the dt parameter. In this case, the date must be in the format yyyy-mm-dd, where yyyy is the four-digit year, mm is the month (either one or two digits), and dd is the day of the month (either one or two digits)
  2. Supply the date as three separate parameters:
    • y is the year, as four digits.
    • m is the month, as one or two digits.
    • d is the day of the month, as either one or two digits.
Use this form if you only have a partial date, such as the year or the month and year.

In addition, you can supply text to precede and/or follow the date, to provide some qualification. This text is ignored when sorting the table by date.

  • Use date prefix to supply text to precede the date.
  • Use date suffix to supply text to follow the date.

These parameters allow you to produce dates such as the following:

  • by 13th March, 1943
  • 29th February, 1904?

These parameters can be used with either method of supplying the date.

Data block

Use the following data block if you prefer the first method of supplying dates.

{{Railway date|(category)|s=|date prefix=|dt=|date suffix=|e=}}

Use the following data block if you prefer the second method of supplying dates.

{{Railway date|(category)|s=|date prefix=|d=|m=|y=|date suffix=|e=}}

Use the following data block if you prefer the second method of supplying dates and prefer the parameters in the U.S. date order (the result will be the same as the previous methods)

{{Railway date|(category)|s=|date prefix=|m=|d=|y=|date suffix=|e=}}

See also

Personal tools
Namespaces

Variants
Actions
visitor navigation
contributor navigation
monitoring
Toolbox