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

Садржај обрисан Садржај додат
test i vr
vr
Ред 1:
<includeonly><span -style="white-space:nowrap;">{{#if both|:{{{1df|}}}|[[{{#expr:{{{3}}}}}. {{4MONTHNAME|{{{2}}}}}]]|[[{{#expr:{1{{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><!--BEGIN!!!-->{{#if:{{{15|}}}<!--begin#1-->
<includeonly><span style="white-space:nowrap;"><!-- start of "if all" >>>
|{{#if:{{{6|}}}<!--begin#3-->
-->{{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 all birth values are specified -->&ensp;({{if bothage|{{{1|4}}}|{{{4|5}}}||{{#if:{6}}}|{{{1}}}|{{{2}}}|<!-- if 1 and not 4 >>>>>>>>>>{{{3}}}}} год.)
--> |{{#ifexpr:{{{12}}}><{{{45}}}<!--begin#7-->
-->{{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 >>>>>>>>>>
|<!-- if allbirth valuesmonth exceptbut deathnot day are specifiedexist and birth month didwas not reachreached in death monthyear -->&ensp;({{age|{{{4}}}|12|31|{{{51}}}|{{{62}}}|{{{13}}}|1|1}} год.)
-->{{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 >>>>>>>>>>
|{{#ifexpr:{{{2}}}<>{{{5}}}<!--begin#7--><!-- if allbirth valuesmonth exceptbut deathnot day are specifiedexist and birth month didwas reachreached in death monthyear -->
-->{{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"
|&ensp;({{age|{{{4}}}|311|121|{{{1}}}|{{{2}}}|{{{3}}}}} год.)
-->}}}}<!-- <<< end of "if all"
|<!-- if allbirth valuesmonth exceptbut deathnot day are specifiedexist and birth month is the death month -->&ensp;({{age|{{{4}}}|12|31|{{{51}}}|{{{62}}}|{{{13}}}|12|31}}/{{age|{{{4}}}|1|1|{{{51}}}|{{{62}}}|{{{13}}}|1|1}} год.)}}<!--end#7-->}}<!--end#6-->
-->{{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:{{{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;({{#ifexpr:Age in years|{{{24}}}>|{{{51}}}}} год.)}}</small><!--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 --
-->{{if both|{{{1|}}}|{{{4|}}}|{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{{1|}}} ) OR ( {{{1|}}} - {{{4|}}} > 150 )
| <br />&#32;{{error|Грешка: Невалидна година смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
if not both:-->|}}{{#if:{{{15|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{CURRENTYEAR{5|}}} < 1 )
| <br />&#32;{{error|Грешка: НевалиднаНевалидан година смртимесец.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|}}
}}}}{{#if:{{{46|}}}|{{#ifexpr: ( {{{43|}}} > 31 ) OR ( {{CURRENTYEAR{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
| <br />&#32;{{error|Грешка: НевалиднаНевалидан година рођењадан.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|}}
}}}}}}</span></includeonly><noinclude>
}}}}}}{{if both|{{{2|}}}|{{{5|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
| <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>