Шаблон:Датум смрти — разлика између измена
Садржај обрисан Садржај додат
vr |
+ |
||
Ред 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}}}}}]] |else={{if all|{{{1|}}}|{{{2|}}}|{{{4|}}}|n=3|then=[[{{MONTHNAME|{{{2}}}}}]] |else=<!-- start of "if both" >>>
|{{#if:{{{6|}}}▼
-->{{if both|{{{2|}}}{{{3|}}}|{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{2|}}}{{{3|}}}|{{error|Грешка: Недостаје година или потпун датум рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}{{#ifeq:{{{2|}}}{{{3|}}}{{{5|}}}{{{6|}}}||{{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|}}}|{{error|Грешка: Недостаје година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}{{#ifeq:{{{2|}}}{{{3|}}}{{{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 --> ({{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{{3}}}}} год.)▼
-->{{if both|{{{2|}}}{{{3|}}}|{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум<br />рођења ''и'' година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}|{{#if:{{{5|}}}{{{6|}}}||{{#if:{{{2|}}}{{{3|}}}|{{error|Грешка: Недостаје година или датум рођења<br />''и'' година или потпун датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}{{#if:{{{2|}}}{{{3|}}}||{{#if:{{{5|}}}{{{6|}}}|{{error|Грешка: Недостаје година или потпун датум<br />рођења ''и'' година или датум смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}{{#if:{{{2|}}}{{{3|}}}{{{5|}}}{{{6|}}}||{{error|Грешка: Шаблон је потпуно празан!}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}}}}}<!-- <<<<<<<<<< if both 1 and 4 are empty -->}}}}</small><!-- <<< 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"
| ({{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{{3}}}}} год.)▼
▲
|<!-- if birth month but not day exist and birth month is the death month --> ({{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 --> ({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|{{{2}}}|{{{3}}}}} год.)|else={{if both<!--begin#5-->|{{{2|}}}|{{{4|}}}|<!-- if all values except death day are specified
▲ |<!-- if
▲ |{{#ifexpr:{{{2}}}
▲ |<!-- if
|<!--else#5-->{{#if:<!--begin#6-->{{{4|}}}|<!-- if all values except death month or both death month and death day are specified
|<!-- if all values except death month or both death month and death day are specified and birth year did not reach death year --> ({{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|1|1}}/{{age|{{{4}}}|{{{5}}}|{{{6}}}|{{{1}}}|12|31}} год.)
|{{#ifexpr:{{{1}}}<{{{4}}}<!--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 --> (0 год.)}}<!--end#8-->}}<!--end#7-->}}<!--end#6-->}}<!--end#5-->}}<!--end#4-->
|<!--else#3-->{{if both<!--begin#4-->|{{{2|}}}{{{3|}}}{{{5|}}}|{{{4|}}}|{{#ifexpr:{{#if:{{{2|}}}|{{{2|}}}|0}}>{{{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 --> ({{age|{{{4}}}|1|1|{{{1}}}|{{{2}}}|{{#if:{{{3|}}}|{{{3|}}}|31}}}} год.)
|{{#ifexpr:{{#if:{{{2|}}}|{{{2|}}}|13}}<{{{5}}}<!--begin#6--><!-- if all values except birth day or both birth and death day are specified and birth month did reach death month -->
| ({{age|{{{4}}}|12|31|{{{1}}}|{{{2}}}|{{#if:{{{3|}}}|{{{3|}}}|1}}}} год.)
|<!-- if all values except birth day or both birth and death day are specified and birth month is death month --> ({{age|{{{4}}}|{{{5}}}|31|{{{1}}}|{{{5}}}|{{#if:{{{3|}}}|{{{3|}}}|1}}}}/{{age|{{{4}}}|{{{5}}}|1|{{{1}}}|{{{5}}}|{{#if:{{{3|}}}|{{{3|}}}|31}}}} год.)}}<!--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|}}}{{{3|}}}{{{4|}}}|{{{6|}}}{{{3|}}}|{{{4|}}}|n=3|then={{#ifexpr:{{{1}}}>{{{4}}}<!--begin#4-->
|<!-- if two years and either death month or death day or birth day are specified and birth year did not reach death year --> ({{replace|{{replace|{{replace|{{Age in years|{{{4}}}|{{{1}}}}}|-|/}}|–|/}}|—|/}} год.)
|{{#ifexpr:{{{1}}}<{{{4}}}<!--begin#5--><!-- if two years and either death month or death day or birth 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 two years and either death month or death day or birth day are specified and birth year is death year --> (0 год.)}}<!--end#5-->}}<!--end#4-->}}<!--end#3-->{{if both<!--begin#3-->|{{{1|}}}|{{{4|}}}|{{#if:{{{2|}}}{{{3|}}}{{{6|}}}<!--begin#4-->|| ({{replace|{{replace|{{replace|{{Age in years|{{{4}}}|{{{1}}}}}|-|/}}|–|/}}|—|/}} год.)}}<!--end#4-->}}<!--end#3-->}}<!--end#2-->{{#if:<!--begin#2-->{{{4|}}}|{{if both|{{{2|}}}|{{{6|}}}||<!-- if all values except both birth and death month or both birth and death month and death day are specified
-->{{#ifexpr:{{{1}}}>{{{4}}}<!--begin#3-->
|<!-- if all values except both birth and death month or both birth and death month and death day are specified and birth year did not reach death year -->{{if both|{{{3|}}}|{{{6|}}}||{{#ifeq:{{{2|}}}{{{3|}}}{{{5|}}}{{{6|}}}|||{{if both|{{#ifeq:{{{5|}}}{{{6|}}}||*}}|{{if all|{{{2|}}}|{{{3|}}}|{{{4|}}}|n=3|then=*}}||{{if both|{{#ifeq:{{{2|}}}{{{3|}}}{{{5|}}}||*}}|{{#if:{{{6|}}}|*}}|| ({{replace|{{replace|{{replace|{{Age in years|{{{4}}}|{{{1}}}}}|-|/}}|–|/}}|—|/}} год.)}}}}}}}}
|{{#ifexpr:{{{1}}}<{{{4}}}<!--begin#4--><!-- if all values except both birth and death month or both birth and 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 both birth and death month or both birth and death month and death day are specified and birth year is death year --> (0 год.)}}<!--end#4-->}}}}<!--end#3-->}}<!--end#2-->}}<!--END CONDITION TO DECIDE WHETHER TO DO else#2 OR NOT...-->}}<!--end#1--><!--END!!!--><!--
-- Error checks --
--><small>{{if both|{{{1|}}}|{{{4|}}}|{{#ifexpr: ( {{{1|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{CURRENTYEAR}} ) OR ( {{{4|}}} > {{{1|}}} ) OR ( {{{1|}}} - {{{4|}}} > 150 )
| &
| &
}}}}{{#if:{{{
| &
}}}}}}{{if both|{{{2|}}}|{{{5|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 ) OR ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
}}</span></includeonly><noinclude>▼
|  • {{error|Грешка: Невалидан месец смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
if not both:-->|{{#if:{{{2|}}}|{{#ifexpr: ( {{{2|}}} > 12 ) OR ( {{{2|}}} < 1 )
|  • {{error|Грешка: Невалидан месец смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}{{#if:{{{5|}}}|{{#ifexpr: ( {{{5|}}} > 12 ) OR ( {{{5|}}} < 1 )
|  • {{error|Грешка: Невалидан месец рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}{{if both|{{{3|}}}|{{{6|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 ) OR ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
|  • {{error|Грешка: Невалидан дан смрти и/или рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}}}<!--
if not both:-->|{{#if:{{{3|}}}|{{#ifexpr: ( {{{3|}}} > 31 ) OR ( {{{3|}}} < 1 )
|  • {{error|Грешка: Невалидан дан смрти.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}{{#if:{{{6|}}}|{{#ifexpr: ( {{{6|}}} > 31 ) OR ( {{{6|}}} < 1 )
|  • {{error|Грешка: Невалидан дан рођења.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}{{if all|{{{1|}}}|{{#ifeq:{{{2|}}}|2|*}}|{{{3|}}}|n=3|then={{#ifexpr:({{{3|}}}>29) OR ({{{3|}}}<1)
|  • {{error|Грешка: Фебруар не може имати {{{3|}}} дана.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
| {{#ifexpr:(({{{1|}}}mod4>0) OR ({{{1|}}}mod100=0 AND {{{1|}}}mod400>0)) AND (({{{3|}}}=29))
|  • {{error|Грешка: Фебруар у непреступној {{{1|}}}. години нема 29 дана.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
}}}}}}{{if all|{{{4|}}}|{{#ifeq:{{{5|}}}|2|*}}|{{{6|}}}|n=3|then={{#ifexpr:({{{6|}}}>29) OR ({{{6|}}}<1)
|  • {{error|Грешка: Фебруар не може имати {{{6|}}} дана.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
| {{#ifexpr:(({{{4|}}}mod4>0) OR ({{{4|}}}mod100=0 AND {{{4|}}}mod400>0)) AND (({{{6|}}}=29))
|  • {{error|Грешка: Фебруар у непреступној {{{4|}}}. години нема 29 дана.}}{{main other|[[Категорија:Странице које користе шаблон за датум смрти са невалидним датумом]]}}
▲}}}}}}</small></span></includeonly><noinclude>
{{documentation}}</noinclude>
|