Шаблон:Dts
{{#ifeq:dts |док
|
{{#ifeq:show |show
|| Ово је документациона подстраница за Шаблон:Dts. Садржи информације о коришћењу, категоријама и другом садржају који није део оригиналне странице. |
}}{{#if: |
| {{#ifexist:Шаблон:Dts
| [[Категорија:Документација {{#switch:Шаблон |Шаблон=шаблона |Модул=модула |Корисник=корисничких страница |#default=Википедије}}]]
|
}}
}}
|
}}
Please check that you do actually need this template before using it. Default date sorting does not work for spelled-out month–year or year–month combos and dates before the year 100, but it works in most other circumstances. Furthermore, this template litters the text content of tables, and data-sort-value should generally be preferred. For more information, see Help:Sorting § Date sorting problems. |
| {{#if:{{#ifeq: n|n|Stop hand nuvola.svg}} |[[File:{{#ifeq: n|n|Stop hand nuvola.svg}}|40px|Обавештење]]}} | {{#if: | ' }}{{#ifeq: n|n
|Овај шаблон не би требало да се користи у шаблонима за навођење извора као што је CS1 или CS2, зато што укључује означавање које ће да загади COinS метаподатке који се производе; погледајте COinS на Википедији. |Овај шаблон је сигуран за употребу у шаблонима за навођење извора који производе COinS метаподатке; погледајте COinS на Википедији. Ако се дода HTML или друго означавање, онда се шаблон мора поново оценити.}} | {{#if: |{{{imageright}}} |{{#if: |}} }} |
| Ovaj šablon pokreće Lua: |
Dts (date time sorting) is used to correctly sort and display dates in a sortable table (see Help:Sorting).
What it solves
Normally, for proper sorting, dates must be entered in YYYY-MM-DD format. However, that format does not conform to the Manual of Style for date display. This template automatically creates the hidden key for sorting purposes whilst displaying the date in an alternative format (e.g. day-month-year).
Parameters
Dates
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:year|year| |year | }}{{#ifeq:month|month| |month | }}{{#ifeq:day|day| |day | }}{{#ifeq:BC|BC| |BC | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}} | {{{{#if:dts|dts| tlf|...}}{{#ifeq:date|date| |date | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
| input style | input code | hidden sort key | visible output | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:year|year| |year | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1893|||{{{4}}} | {{#if: | |1893||{{{3}}} | {{#if: | |1893|{{{2}}} | {{#if:1893 | |1893
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | 1893
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|-89|||{{{4}}} | {{#if: | |-89||{{{3}}} | {{#if: | |-89|{{{2}}} | {{#if:-89 | |-89
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | 89 p. n. e.
}} | ||||||||
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|-10000|||{{{4}}} | {{#if: | |-10000||{{{3}}} | {{#if: | |-10000|{{{2}}} | {{#if:-10000 | |-10000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | 10.000 p. n. e.
}} | ||||||||
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:month|month| |month | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|октобар|||{{{4}}} | {{#if: | |октобар||{{{3}}} | {{#if: | |октобар|{{{2}}} | {{#if:октобар | |октобар
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'октобар' nije validan datum | Greška u šablonu Dts: 'октобар' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:month year|month year| |month year | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|фебруар 1767|||{{{4}}} | {{#if: | |фебруар 1767||{{{3}}} | {{#if: | |фебруар 1767|{{{2}}} | {{#if:фебруар 1767 | |фебруар 1767
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'фебруар 1767' nije validan datum | Greška u šablonu Dts: 'фебруар 1767' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:day month year|day month year| |day month year | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|12. август 1987|||{{{4}}} | {{#if: | |12. август 1987||{{{3}}} | {{#if: | |12. август 1987|{{{2}}} | {{#if:12. август 1987 | |12. август 1987
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '12. август 1987' nije validan datum | Greška u šablonu Dts: '12. август 1987' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:month day, year|month day, year| |month day, year | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|јул 1, 1867|||{{{4}}} | {{#if: | |јул 1, 1867||{{{3}}} | {{#if: | |јул 1, 1867|{{{2}}} | {{#if:јул 1, 1867 | |јул 1, 1867
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јул 1, 1867' nije validan datum | Greška u šablonu Dts: 'јул 1, 1867' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:day month|day month| |day month | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|25. октобар|||{{{4}}} | {{#if: | |25. октобар||{{{3}}} | {{#if: | |25. октобар|{{{2}}} | {{#if:25. октобар | |25. октобар
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '25. октобар' nije validan datum | Greška u šablonu Dts: '25. октобар' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:month day|month day| |month day | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|јануар 1|||{{{4}}} | {{#if: | |јануар 1||{{{3}}} | {{#if: | |јануар 1|{{{2}}} | {{#if:јануар 1 | |јануар 1
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јануар 1' nije validan datum | Greška u šablonu Dts: 'јануар 1' nije validan datum
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:YYYY-MM-DD|YYYY-MM-DD| |YYYY-MM-DD | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2014-12-09|||{{{4}}} | {{#if: | |2014-12-09||{{{3}}} | {{#if: | |2014-12-09|{{{2}}} | {{#if:2014-12-09 | |2014-12-09
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | decembar 9, 2014
}} | |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:year|year| |year | }}{{#ifeq:month|month| |month | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1990|10||{{{4}}} | {{#if: | |1990|10|{{{3}}} | {{#if:10 | |1990|10 | {{#if:1990 | |1990
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 1990
}} | ||
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1980|децембар||{{{4}}} | {{#if: | |1980|децембар|{{{3}}} | {{#if:децембар | |1980|децембар | {{#if:1980 | |1980
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'децембар' nije validna vrednost za mesec | Greška u šablonu Dts: 'децембар' nije validna vrednost za mesec
}} | |||||||
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1970|август||{{{4}}} | {{#if: | |1970|август|{{{3}}} | {{#if:август | |1970|август | {{#if:1970 | |1970
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'август' nije validna vrednost za mesec | Greška u šablonu Dts: 'август' nije validna vrednost za mesec
}} | |||||||
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:year|year| |year | }}{{#ifeq:month|month| |month | }}{{#ifeq:day|day| |day | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2024|јун|12|{{{4}}} | {{#if:12 | |2024|јун|12 | {{#if:јун | |2024|јун | {{#if:2024 | |2024
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јун' nije validna vrednost za mesec | Greška u šablonu Dts: 'јун' nije validna vrednost za mesec
}} | ||
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|-204|11|22|{{{4}}} | {{#if:22 | |-204|11|22 | {{#if:11 | |-204|11 | {{#if:-204 | |-204
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | novembar 22, 204 p. n. e.
}} | ||||||||
| {{{{#if:dts|dts| tlf|...}}{{#ifeq:year|year| |year | }}{{#ifeq:month|month| |month | }}{{#ifeq:day|day| |day | }}{{#ifeq:era|era| |era | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|44|3|15|BC | {{#if:15 | |44|3|15 | {{#if:3 | |44|3 | {{#if:44 | |44
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | mart 15, 44 p. n. e.
}} | ||||
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|94|октобар|17|AD | {{#if:17 | |94|октобар|17 | {{#if:октобар | |94|октобар | {{#if:94 | |94
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'октобар' nije validna vrednost za mesec | Greška u šablonu Dts: 'октобар' nije validna vrednost za mesec
}} | |||||||
| {{{{#if:dts|dts| tlf|...}}{{#ifeq: | }}{{#ifeq:month|month| |month | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
||мај||{{{4}}} | {{#if: | ||мај|{{{3}}} | {{#if:мај | ||мај | {{#if: | |
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'мај' nije validna vrednost za mesec | Greška u šablonu Dts: 'мај' nije validna vrednost za mesec
}} |
| {{{{#if:dts|dts| tlf|...}}{{#ifeq: | }}{{#ifeq:month|month| |month | }}{{#ifeq:day|day| |day | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}{{#ifeq:x | }}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
||септембар|12|{{{4}}} | {{#if:12 | ||септембар|12 | {{#if:септембар | ||септембар | {{#if: | |
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'септембар' nije validna vrednost za mesec | Greška u šablonu Dts: 'септембар' nije validna vrednost za mesec
}} |
Formatting
Using format produces a format that depends on, but is not necessarily equal to the format of the supplied date. The format parameter can take nine values.
dmy|
{{#if:|
{{#if:dm|
{{#if:|
{{#if:mdy|
{{#if:|
{{#if:md|
{{#if:|
{{#if:my|
{{#if:d|
{{#if:m|
{{#if:y|
{{#if:hide|
| value | function | input code | hidden sort key | visible output | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |
}}{{#if:format depends on the input| |
format depends on the input|
}}|
|
|26. јануар 1788|||{{{4}}} | {{#if: | |26. јануар 1788||{{{3}}} | {{#if: | |26. јануар 1788|{{{2}}} | {{#if:26. јануар 1788 | |26. јануар 1788
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '26. јануар 1788' nije validan datum | Greška u šablonu Dts: '26. јануар 1788' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|март 12, 1557|||{{{4}}} | {{#if: | |март 12, 1557||{{{3}}} | {{#if: | |март 12, 1557|{{{2}}} | {{#if:март 12, 1557 | |март 12, 1557
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'март 12, 1557' nije validan datum | Greška u šablonu Dts: 'март 12, 1557' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1975-02-13|||{{{4}}} | {{#if: | |1975-02-13||{{{3}}} | {{#if: | |1975-02-13|{{{2}}} | {{#if:1975-02-13 | |1975-02-13
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | februar 13, 1975
}} | |
dmy|
}}{{#if:displays the date in day-month-year format| |
displays the date in day-month-year format|
}}|
|
|септембар 13, 1888|||{{{4}}} | {{#if: | |септембар 13, 1888||{{{3}}} | {{#if: | |септембар 13, 1888|{{{2}}} | {{#if:септембар 13, 1888 | |септембар 13, 1888
}}
}}
}}
}}{{#if:dmy
|
|format=dmy
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'септембар 13, 1888' nije validan datum | Greška u šablonu Dts: 'септембар 13, 1888' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1983-01-03|||{{{4}}} | {{#if: | |1983-01-03||{{{3}}} | {{#if: | |1983-01-03|{{{2}}} | {{#if:1983-01-03 | |1983-01-03
}}
}}
}}
}}{{#if:dmy
|
|format=dmy
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | 3 januar 1983
}} | |
dm|
}}{{#if:displays only the day and month in day-month format| |
displays only the day and month in day-month format|
}}|
|
|фебруар 26, 1788|||{{{4}}} | {{#if: | |фебруар 26, 1788||{{{3}}} | {{#if: | |фебруар 26, 1788|{{{2}}} | {{#if:фебруар 26, 1788 | |фебруар 26, 1788
}}
}}
}}
}}{{#if:dm
|
|format=dm
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'фебруар 26, 1788' nije validan datum | Greška u šablonu Dts: 'фебруар 26, 1788' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2020-10-15|||{{{4}}} | {{#if: | |2020-10-15||{{{3}}} | {{#if: | |2020-10-15|{{{2}}} | {{#if:2020-10-15 | |2020-10-15
}}
}}
}}
}}{{#if:dm
|
|format=dm
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | 15 oktobar
}} | |
mdy|
}}{{#if:displays the date in month-day-year format| |
displays the date in month-day-year format|
}}|
|
|август 31, 1901|||{{{4}}} | {{#if: | |август 31, 1901||{{{3}}} | {{#if: | |август 31, 1901|{{{2}}} | {{#if:август 31, 1901 | |август 31, 1901
}}
}}
}}
}}{{#if:mdy
|
|format=mdy
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'август 31, 1901' nije validan datum | Greška u šablonu Dts: 'август 31, 1901' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2006-11-08|||{{{4}}} | {{#if: | |2006-11-08||{{{3}}} | {{#if: | |2006-11-08|{{{2}}} | {{#if:2006-11-08 | |2006-11-08
}}
}}
}}
}}{{#if:mdy
|
|format=mdy
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | novembar 8, 2006
}} | |
md|
}}{{#if:displays only the day and month in month-day format| |
displays only the day and month in month-day format|
}}|
|
|26. јун 1988|||{{{4}}} | {{#if: | |26. јун 1988||{{{3}}} | {{#if: | |26. јун 1988|{{{2}}} | {{#if:26. јун 1988 | |26. јун 1988
}}
}}
}}
}}{{#if:md
|
|format=md
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '26. јун 1988' nije validan datum | Greška u šablonu Dts: '26. јун 1988' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2002-05-27|||{{{4}}} | {{#if: | |2002-05-27||{{{3}}} | {{#if: | |2002-05-27|{{{2}}} | {{#if:2002-05-27 | |2002-05-27
}}
}}
}}
}}{{#if:md
|
|format=md
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | maj 27
}} | |
my|
}}{{#if:displays only the month and year in month-year format| |
displays only the month and year in month-year format|
}}|
|
|16. новембар 1488|||{{{4}}} | {{#if: | |16. новембар 1488||{{{3}}} | {{#if: | |16. новембар 1488|{{{2}}} | {{#if:16. новембар 1488 | |16. новембар 1488
}}
}}
}}
}}{{#if:my
|
|format=my
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '16. новембар 1488' nije validan datum | Greška u šablonu Dts: '16. новембар 1488' nije validan datum
}} |
d|
}}{{#if:displays only the day| |
displays only the day|
}}|
|
|6. јул 1666|||{{{4}}} | {{#if: | |6. јул 1666||{{{3}}} | {{#if: | |6. јул 1666|{{{2}}} | {{#if:6. јул 1666 | |6. јул 1666
}}
}}
}}
}}{{#if:d
|
|format=d
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '6. јул 1666' nije validan datum | Greška u šablonu Dts: '6. јул 1666' nije validan datum
}} |
m|
}}{{#if:displays only the month| |
displays only the month|
}}|
|
|1980-02-12|||{{{4}}} | {{#if: | |1980-02-12||{{{3}}} | {{#if: | |1980-02-12|{{{2}}} | {{#if:1980-02-12 | |1980-02-12
}}
}}
}}
}}{{#if:m
|
|format=m
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | februar
}} | |
y|
}}{{#if:displays only the year| |
displays only the year|
}}|
|
|-26|јануар|18|{{{4}}} | {{#if:18 | |-26|јануар|18 | {{#if:јануар | |-26|јануар | {{#if:-26 | |-26
}}
}}
}}
}}{{#if:y
|
|format=y
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec
}} |
hide|
}}{{#if:hides the date| |
hides the date|
}}|
|
|15. октобар 1800|||{{{4}}} | {{#if: | |15. октобар 1800||{{{3}}} | {{#if: | |15. октобар 1800|{{{2}}} | {{#if:15. октобар 1800 | |15. октобар 1800
}}
}}
}}
}}{{#if:hide
|
|format=hide
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '15. октобар 1800' nije validan datum | Greška u šablonu Dts: '15. октобар 1800' nije validan datum
}} |
Abbreviation
There are two ways of abbreviating the month name.
- Directly input an abbreviated month name.
- Use the
abbr=onparameter.
abbr=on|
{{#if:|
{{#if:|
{{#if:|
| abbreviation method | input code | hidden sort key | visible output | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| none|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000-01-01|||{{{4}}} | {{#if: | |2000-01-01||{{{3}}} | {{#if: | |2000-01-01|{{{2}}} | {{#if:2000-01-01 | |2000-01-01
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | januar 1, 2000
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000|1|1|{{{4}}} | {{#if:1 | |2000|1|1 | {{#if:1 | |2000|1 | {{#if:2000 | |2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | januar 1, 2000
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|1. јануар 2000|||{{{4}}} | {{#if: | |1. јануар 2000||{{{3}}} | {{#if: | |1. јануар 2000|{{{2}}} | {{#if:1. јануар 2000 | |1. јануар 2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '1. јануар 2000' nije validan datum | Greška u šablonu Dts: '1. јануар 2000' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000|јануар|1|{{{4}}} | {{#if:1 | |2000|јануар|1 | {{#if:јануар | |2000|јануар | {{#if:2000 | |2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec
}} |
| abbreviated input|
}}{{#if:| |
{{{b}}}|
}}|
|
|1. јануар 2000|||{{{4}}} | {{#if: | |1. јануар 2000||{{{3}}} | {{#if: | |1. јануар 2000|{{{2}}} | {{#if:1. јануар 2000 | |1. јануар 2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '1. јануар 2000' nije validan datum | Greška u šablonu Dts: '1. јануар 2000' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000|јануар|1|{{{4}}} | {{#if:1 | |2000|јануар|1 | {{#if:јануар | |2000|јануар | {{#if:2000 | |2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec
}} |
abbr=on|
}}{{#if:| |
{{{b}}}|
}}|
|
|1. јануар 2000|||{{{4}}} | {{#if: | |1. јануар 2000||{{{3}}} | {{#if: | |1. јануар 2000|{{{2}}} | {{#if:1. јануар 2000 | |1. јануар 2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:on
|
|abbr=on
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: '1. јануар 2000' nije validan datum | Greška u šablonu Dts: '1. јануар 2000' nije validan datum
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000|јануар|1|{{{4}}} | {{#if:1 | |2000|јануар|1 | {{#if:јануар | |2000|јануар | {{#if:2000 | |2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:on
|
|abbr=on
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec | Greška u šablonu Dts: 'јануар' nije validna vrednost za mesec
}} |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000-01-01|||{{{4}}} | {{#if: | |2000-01-01||{{{3}}} | {{#if: | |2000-01-01|{{{2}}} | {{#if:2000-01-01 | |2000-01-01
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:on
|
|abbr=on
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | jan 1, 2000
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2000|1|1|{{{4}}} | {{#if:1 | |2000|1|1 | {{#if:1 | |2000|1 | {{#if:2000 | |2000
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:on
|
|abbr=on
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | jan 1, 2000
}} |
Additional sort key
In case two dates in a table are identical they may be ordered using the addkey parameter.
| input code | hidden sort key | visible output | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-10|||{{{4}}} | {{#if: | |2010-10-10||{{{3}}} | {{#if: | |2010-10-10|{{{2}}} | {{#if:2010-10-10 | |2010-10-10
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:3
|
|addkey=3
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 10, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-09|||{{{4}}} | {{#if: | |2010-10-09||{{{3}}} | {{#if: | |2010-10-09|{{{2}}} | {{#if:2010-10-09 | |2010-10-09
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 9, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-10|||{{{4}}} | {{#if: | |2010-10-10||{{{3}}} | {{#if: | |2010-10-10|{{{2}}} | {{#if:2010-10-10 | |2010-10-10
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:1
|
|addkey=1
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 10, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-10|||{{{4}}} | {{#if: | |2010-10-10||{{{3}}} | {{#if: | |2010-10-10|{{{2}}} | {{#if:2010-10-10 | |2010-10-10
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 10, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-10|||{{{4}}} | {{#if: | |2010-10-10||{{{3}}} | {{#if: | |2010-10-10|{{{2}}} | {{#if:2010-10-10 | |2010-10-10
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:4
|
|addkey=4
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 10, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-11|||{{{4}}} | {{#if: | |2010-10-11||{{{3}}} | {{#if: | |2010-10-11|{{{2}}} | {{#if:2010-10-11 | |2010-10-11
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:
|
|addkey=
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 11, 2010
}} | |
| {{{a}}}|
}}{{#if:| |
{{{b}}}|
}}|
|
|2010-10-10|||{{{4}}} | {{#if: | |2010-10-10||{{{3}}} | {{#if: | |2010-10-10|{{{2}}} | {{#if:2010-10-10 | |2010-10-10
}}
}}
}}
}}{{#if:
|
|format=
}}{{#if:
|
|abbr=
}}{{#if:2
|
|addkey=2
}}}} {{#if: |
Шаблон:Dts/testcases/colour | oktobar 10, 2010
}} |
Wrapping
To turn off the suppression of word wraps, use the nowrap=off parameter.
Notes
Sorting for incomplete dates
- Whole months or years
- A whole year or month (and year) is sorted according to its first day.
- Missing years
- If the year is not specified, the date will be sorted as if the year were the current year.
- Blank dates
- For no date input at all, the maximum possible sort key is used, so the entry will sort last.
Error handling
Entering an invalid date format will (generally) produce an error message (such as the one below, generated by {{dts|35. јун 1900}}).
Greška u šablonu Dts: '35. јун 1900' nije validan datum
Errors are tracked in Category:Dts templates with errors.
Calendar choice
The template is not capable of distinguishing Julian and Gregorian calendar dates. Also, it is not capable of taking a date in one calendar as input and outputting a date in the other calendar. Thus, to insure proper sorting, editors must either use one calendar for all dates, or pick a specific changeover date (for example, deciding that 4 October 1582 is Julian and all later dates are Gregorian); this would be done on an article-by article basis. Editors are also responsible for explaining to the reader whether the visible dates are Julian or Gregorian, if there is any possibility of confusion.
Linking
The template formerly linked dates automatically, with link=off used to suppress linking. In accordance with current guidelines linking of dates is no longer supported and instances of link=off should be removed. Transclusions using the |{{SAFESUBST:#if:link|link=}} parameter are tracked in Category:Dts templates with deprecated parameters.
See also
- m:Template:dts {{safesubst:#if:(повратни линкови уреди)
|(повратни линкови уреди) |90% }}, since on Meta e.g. 09999 9999 induces numeric sort mode, "&" is prefixed to force string sort mode.
- {{sort}}, sorting by a specified key (also good for complicated numbers, e.g. scientific notation)
- {{sortname}}, full name sorting (using "last name, first name" as default sort key)
- {{tts}}, for sorting times in result tables of athletic events (only needed in certain cases - see template documentation)
- {{mss}}, for sorting times in tables of eclipses
- {{nts}}, for numbers
{{#ifeq:Dts|sandbox | |
}}