User:Pi zero/Archives/on this day/p1

2015

Several dead in Oregon college shootings

[edit] Documentation

Usage

edit

This is a subtemplate of {{User:Pi zero/Archives/on this day}}. It takes two parameters, both expected to be positive integers, the first larger than the second and the second expected to be no larger than 6. It generates a list of six increasing integers, approximately evenly spaced, such that the integer indexed by the second parameter is the first parameter (for example, if the parameters are 10 and 6, the sixth integer should be 10); and passes these integers to {{User:Pi zero/Archives/on this day/p2}}.

Call the two parameters n and m. The template computes ratio n/m, lists the first six multiples of that ratio, and rounds each down to an integer. In the event, n is the number of previous years that Wikinews was operational on this day, and m is the number of years to be sampled. If m is less than the number of parameters passed on, any extra parameters produce displacements to years before Wikinews began, so no articles were published on this day in those years and nothing will be generated for them. Example: if Wikinews was operational on this day for the past 12 years, and we want four sample articles, n=12 and m=4 would produce list 3, 6, 9, 12, 15, 18. The next subtemplate (p2) may shift this list down by one or two, but even the largest shift would produce 1, 4, 7, 10, 13, 16, with the last two entries indexing years with no articles.