Template:Rank course
This template is used on the This Week's Ranking article to calculate the total number of times a course appeared in a ranked cup in Mario Kart Tour based on the current date (February 16, 2025). It accounts for tour reruns. Without it, users would have to manually update the number each time a course reappears in ranked mode in a rerun tour.
The way the template works is as follows:
- It calculates how many days have passed since a course appeared in a ranked cup during the first "Tour Loop" (the first time the Battle Tour 2022–Anniversary Tour 2023 interval was recycled). This Tour Loop falls in the interval of October 3, 2023–October 1, 2024.
- Then, the template determines how many years this number of days is equal to and rounds it to the nearest integer below it. The resulting number is the same as the number of appearances of that course in ranked cups since the first Tour Loop.
- If a course was in ranked mode two times during a Tour Loop instead of just once, the template performs the previous steps for both instances of this course in ranked, and adds up the resulting numbers.
- Finally, the template adds up the number entered by the user in the column for ranked cup appearances up to and including the 2023 Anniversary Tour (before tours started getting rerun) for the grand total of ranked appearances of that course in the history of Mario Kart Tour.
The template has two unnamed parameters, both used to enter the date(s) a course was made available in ranked mode during the first Tour Loop.
Use case
Let's take the course Wario Shipyard R/T as an example. This course was available in ranked mode during the Peach vs. Bowser Tour of May 2022, the Samurai Tour of 2022, the Battle Tour of 2022, and every rerun so far of the 2022 Battle Tour. That means 3 ranked appearances of Wario Shipyard R/T before the first Tour Loop (i.e. before October 3, 2023), and 2 appearances since. With the input code {{rank course|2023-10-03}}
(as this course was in ranked mode starting October 3, 2023 during the first Tour Loop), the template should add those two numbers together and output the number 5.
Why not just use the same code as the "Age" template?
The template "Age" uses the birthdate of a person as a reference, calculating the number of years a person has based on that same day of the month across years. For instance, with a birthdate of July 21, 2000 for Jimmy Poppadopolos, the "Age" template would calculate the age of this person based on the number of times they lived through the exact day of "July 21" in the following years.
The interval between a course's ranked appearances in Mario Kart Tour should be calculated differently, as a Tour Loop doesn't start on the same date every year. With each Tour Loop lasting exactly 52 weeks (on account of the game's tours being 2 weeks long), a loop starting October 4, for example, begins anew on October 3 the following year. That's not even taking leap years into consideration, which push the date even more days behind.