Template:Time table sorting/doc

This template is intended for use in sortable tables of results in athletic events, to ensure that columns of times achieved by athletes will sort correctly.

Template:Time table sorting/doc


This template is intended for use in sortable tables of results in athletic events, to ensure that columns of times achieved by athletes will sort correctly.

This template is not needed if all the times in the relevant table are of exactly the same length and format. For example, results of a one-mile race for elite athletes will usually be of the form m:ss.dd (minutes, seconds, decimals of a second). These will sort correctly, without this template's being necessary, provided the seconds have leading zeroes, and the decimals trailing zeroes where necessary.

However, in a longer race, where the results include times both below and above 10 minutes, then times of 10 to 19 minutes will sort before any lower time of 2 minutes and above. A similar problem occurs in tables holding results above and below 1 minute, or above and below 1 hour, or in tables holding results above and below 10 hours.

This template supplies one way to avoid this problem (see "Possible workaround" below for another).

Use

Just wrap each time in the relevant column with this template, for example {{tts|1:05:10}} . If this template is used, then it must be used on every row of the table.

If times are to be displayed in bold, use {{tts|'''1:05:10'''}} . Note that placing the bolding mark up outside the template will not work.

Formatting

Times displayed by this template are right-aligned to ensure that hours, minutes, seconds and decimals are neatly aligned within the column.

Possible workaround

Consider typing leading zeroes, so that all times are of the same length and format. This may be preferable if not many of the results require such leading zeroes, or if there is consensus that results should be presented with leading zeroes.

Limitation

None of the times should need more than 12 characters to represent its value (this limit could be changed if necessary).

See also


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.