Шаблон:Датум смрти — разлика између измена

С Википедије, слободне енциклопедије
Садржај обрисан Садржај додат
м +
test i vr
Ред 1: Ред 1:
<includeonly><span style="white-space:nowrap;"><!-- start of "if all" >>>
<includeonly><span style="white-space:nowrap;">{{#if:{{{df|}}}|[[{{#expr:{{{3}}}}}. {{MONTHNAME|{{{2}}}}}]]|[[{{#expr:{{{3}}}}}. {{MONTHNAME|{{{2}}}}}]]}} [[{{{1}}}]].<span style="display:none">(<span class="dday deathdate">{{{1}}}-{{padleft:{{MONTHNUMBER|{{{2}}}}}|2|0}}-{{padleft:{{{3}}}|2|0}}</span>)</span><small>{{#if:{{{5|}}}
-->{{if all|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|n=4|then=[[{{#expr:{{{3}}}}}. {{MONTHNAME|{{{2}}}}}]]&nbsp;|else={{if all|{{{1|}}}|{{{2|}}}|{{{4|}}}|n=3|then=[[{{MONTHNAME|{{{2}}}}}]]&nbsp;|else=<!-- start of "if both" >>>
|{{#if:{{{6|}}}
|<!-- if all birth values are specified -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
-->{{if both|{{{1|}}}|{{{4|}}}||{{#if:{{{1|}}}|<!-- if 1 and not 4 >>>>>>>>>>
-->{{if both|{{{2|}}}{{{3|}}}|{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{5|}}}{{{6|}}}||{{#if:{{{2|}}}{{{3|}}}|{{error|Грешка: Недостаје година или потпун датум рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}<!-- <<<<<<<<<< if 1 and not 4 -->|{{#if:{{{4|}}}|<!-- if 4 and not 1 >>>>>>>>>>
|{{#ifexpr:{{{2}}}<{{{5}}}
-->{{if both|{{{2|}}}{{{3|}}}|{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{2|}}}{{{3|}}}||{{#if:{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}<!-- <<<<<<<<<< if 4 and not 1 -->|<!-- if both 1 and 4 are empty >>>>>>>>>>
|<!-- if birth month but not day exist and birth month was not reached in death year -->&ensp;({{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
-->{{if both|{{{2|}}}{{{3|}}}|{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум рођења ''и'' година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{5|}}}{{{6|}}}||{{#if:{{{2|}}}{{{3|}}}|{{error|Грешка: Недостаје година или датум рођења ''и'' година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}{{#if:{{{2|}}}{{{3|}}}||{{#if:{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум рођења ''и'' година или датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}{{#if:{{{2|}}}{{{3|}}}{{{5|}}}{{{6|}}}||{{error|Грешка: Шаблон је потпуно празан! Недостаје година или датум рођења ''и'' година или датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}<!-- <<<<<<<<<< if both 1 and 4 are empty -->}}}}<!-- <<< end of "if both"
|{{#ifexpr:{{{2}}}>{{{5}}}<!-- if birth month but not day exist and birth month was reached in death year -->
-->}}}}<!-- <<< end of "if all"
|&ensp;({{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
-->{{if both|{{{1|}}}|{{{4|}}}|[[{{{1}}}]].}}<span style="display:none">(<span class="dday deathdate">{{{1}}}-{{padleft:{{MONTHNUMBER|{{{2}}}}}|2|0}}-{{padleft:{{{3}}}|2|0}}</span>)</span><small><!--BEGIN!!!-->{{#if:{{{1|}}}<!--begin#1-->
|<!-- if birth month but not day exist and birth month is the death month -->&ensp;({{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
|{{#if:{{{5|}}}<!--begin#2-->
}}
|{{#if:{{{6|}}}<!--begin#3-->
}}
|{{if all<!--begin#4-->|{{{2|}}}|{{{3|}}}|{{{4|}}}|n=3|then=<!-- if all values are specified -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|{{{2}}}|{{{3}}}}} год.)|else={{if both<!--begin#5-->|{{{2|}}}|{{{4|}}}|<!-- if all values except death day are specified
}}
|&ensp;({{Age in years|{{{4}}}|{{{1}}}}} год.)}}</small><!--
-->{{#ifexpr:{{{2}}}>{{{5}}}<!--begin#6-->
|<!-- if all values except death day are specified and birth month did not reach death month -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|1|1}} год.)
|{{#ifexpr:{{{2}}}<{{{5}}}<!--begin#7--><!-- if all values except death day are specified and birth month did reach death month -->
|&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|12|31}} год.)
|<!-- if all values except death day are specified and birth month is death month -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|12|31}}/{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|1|1}} год.)}}<!--end#7-->}}<!--end#6-->
|<!--else#5-->{{if both<!--begin#6-->|{{{3|0}}}|{{{4|}}}|<!-- if all values except death month or both death month and death day are specified
-->{{#ifexpr:{{{1}}}>{{{4}}}<!--begin#7-->
|<!-- if all values except death month or both death month and death day are specified and birth year did not reach death year -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|12|31}}/{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|1|1}} год.)
|{{#ifexpr:{{{1}}}<{{{4|0}}}<!--begin#8--><!-- if all values except death month or both death month and death day are specified and birth year did reach death year... -->
|<!-- ...then it is an error as birth year must be smaller than or equal to death year
-->|<!-- if all values except death month or both death month and death day are specified and birth year is death year -->&ensp;(0 год.)}}<!--end#8-->}}<!--end#7-->}}<!--end#6-->}}<!--end#5-->}}<!--end#4-->
|<!--else#3-->{{if all<!--begin#4-->|{{{2|}}}|{{{3|0}}}|{{{4|}}}|n=3|then={{#ifexpr:{{{2}}}>{{{5}}}<!--begin#5-->
|<!-- if all values except birth day or both birth and death day are specified and birth month did not reach death month -->&ensp;({{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
|{{#ifexpr:{{{2}}}<{{{5}}}<!--begin#6--><!-- if all values except birth day or both birth and death day are specified and birth month did reach death month -->
|&ensp;({{age|{{{4}}}|31|12|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
|<!-- if all values except birth day or both birth and death day are specified and birth month is death month -->&ensp;({{age|{{{4}}}|{{{5}}}|31|{{{1}}}|{{{2}}}|{{{3}}}}}/{{age|{{{4}}}|{{{5}}}|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)}}<!--end#6-->}}<!--end#5-->}}<!--end#4-->}}<!--end#3-->
|<!--else#2-->{{if all|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|n=6|then=|else=<!--BEGIN CONDITION TO DECIDE WHETHER TO DO else#2 OR NOT...-->{{if all<!--begin#3-->|{{{2|0}}}|{{{3|}}}|{{{4|0}}}|{{{6|0}}}|n=4|then={{#ifexpr:{{{1}}}>{{{4}}}<!--begin#4-->
|<!-- if all values except birth day and death month or both birth and death day and birth month, or birth month or both birth day and month, or all but pair of years or all but pair of years and birth or death day are specified and birth year did not reach death year -->&ensp;({{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}}/{{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
|{{#ifexpr:{{{1}}}<{{{4}}}<!--begin#5--><!-- if all values except birth day and death month or both birth and death day and birth month, or birth month or both birth day and month, or all but pair of years or all but pair of years and birth or death day are specified and birth year did reach death year -->
|<!-- ...then it is an error as birth year must be smaller than or equal to death year
-->|<!-- if all values except birth day and death month or both birth and death day and birth month, or birth month or both birth day and month, or all but pair of years or all but pair of years and birth or death day are specified and birth year is death year -->&ensp;(0 год.)}}<!--end#5-->}}<!--end#4-->}}<!--end#3-->{{if both<!--begin#3-->|{{{1|}}}|{{{4|}}}|&ensp;({{Age in years|{{{4}}}|{{{1}}}}} год.)}}<!--end#3-->}}<!--END CONDITION TO DECIDE WHETHER TO DO else#2 OR NOT...-->}}<!--end#2-->
|<!--else#1-->{{if all|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|n=6|then=|else=<!--BEGIN CONDITION TO DECIDE WHETHER TO DO else#1 OR NOT...-->{{if both<!--begin#2-->|{{{3|0}}}|{{{4|}}}|<!-- if all values except both death month and death year are specified
-->{{#ifexpr:{{{1}}}>{{{4}}}<!--begin#3-->
|<!-- if all values except both death month and death year are specified and birth year did not reach death year -->&ensp;({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|12|31}}/{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|1|1}} год.)
|{{#ifexpr:{{{1}}}<{{{4|0}}}<!--begin#4--><!-- if all values except both death month and death year are specified and birth year did reach death year... -->
|<!-- ...then it is an error as birth year must be smaller than or equal to death year
-->|<!-- if all values except both death month and death year are specified and birth year is death year -->&ensp;(0 год.)}}<!--end#4-->}}<!--end#3-->}}<!--end#2-->}}<!--END CONDITION TO DECIDE WHETHER TO DO else#1 OR NOT...-->}}<!--end#1--><!--END!!!--></small><!--
-- Error checks --
-- Error checks --
-->{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{{1|}}} ) OR ( {{{1|}}} - {{{4|}}} > 150 )
-->{{if both|{{{1|}}}|{{{4|}}}|{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{{1|}}} ) OR ( {{{1|}}} - {{{4|}}} > 150 )
| &#32;{{error|Грешка: Невалидна година.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
| <br />{{error|Грешка: Невалидна година смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
}}{{#if:{{{5|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
if not both:-->|{{#if:{{{1|}}}|{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} )
| &#32;{{error|Грешка: Невалидан месец.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|}}
| <br />{{error|Грешка: Невалидна година смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
}}}}{{#if:{{{4|}}}|{{#ifexpr:( {{{4|}}} > {{CURRENTYEAR}} )
| &#32;{{error|Грешка: Невалидан дан.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|}}
| <br />{{error|Грешка: Невалидна година рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}{{if both|{{{2|}}}|{{{5|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
}}</span></includeonly><noinclude>
| <br />{{error|Грешка: Невалидан месец смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
if not both:-->|{{#if:{{{2|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 )
| <br />{{error|Грешка: Невалидан месец смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}{{#if:{{{5|}}}|{{#ifexpr: ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
| <br />{{error|Грешка: Невалидан месец рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}{{if both|{{{3|}}}|{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
| <br />{{error|Грешка: Невалидан дан смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
if not both:-->|{{#if:{{{3|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 )
| <br />{{error|Грешка: Невалидан дан смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
| <br />{{error|Грешка: Невалидан дан рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}</span></includeonly><noinclude>
{{documentation}}</noinclude>
{{documentation}}</noinclude>

Верзија на датум 2. март 2016. у 21:22

Документација шаблона[прикажи] [уреди] [историја] [освежи]

Употреба

{{датум смрти|година_смрти|месец_смрти|дан_смрти|година_рођења|месец_рођења|дан_рођења}}

Пример

{{датум смрти|2001|12|30|2000|12|30}}30. децембар 2001.(2001-12-30) (1 год.)

Категорија за праћење

Види још