틀:Age: 두 판 사이의 차이

S.T.E.L.L.A.-WIKI
(새 문서: {{#ifeq:{{PAGESIZE:{{{1}}}}} | 0 | <!-- Check if parameter 1 is empty --> Please provide a date of birth in the format DD.MM.YYYY. | <!-- If not empty, calculate the age --> {{#time: Y | {{CURRENTTIMESTAMP}}}} <!-- Get the current year --> {{#expr: {{#time: Y | {{CURRENTTIMESTAMP}}}} - {{#time: Y | {{{1}}}}} - ({{#time: n | {{CURRENTTIMESTAMP}}}} < {{#time: n | {{{1}}}}} || ({{#time: n | {{CURRENTTIMESTAMP}}}} = {{#time: n | {{{1}}}}} && {{#time: j | {{CURRENTTIMESTAM...)
 
편집 요약 없음
 
(같은 사용자의 중간 판 7개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{#ifeq:{{PAGESIZE:{{{1}}}}} | 0 | <!-- Check if parameter 1 is empty -->
{{#expr:
  Please provide a date of birth in the format DD.MM.YYYY.
    {{#time:Y | {{CURRENTTIMESTAMP}}}} - {{#time:Y | {{{1}}}}}
| <!-- If not empty, calculate the age -->
    - {{#ifexpr: {{#time:m | {{CURRENTTIMESTAMP}}}} < {{#time:m | {{{1}}}}}
  {{#time: Y | {{CURRENTTIMESTAMP}}}} <!-- Get the current year -->
        | 1
  {{#expr: {{#time: Y | {{CURRENTTIMESTAMP}}}} - {{#time: Y | {{{1}}}}} -
        | {{#ifexpr: {{#time:m | {{CURRENTTIMESTAMP}}}} > {{#time:m | {{{1}}}}}
    ({{#time: n | {{CURRENTTIMESTAMP}}}} < {{#time: n | {{{1}}}}} || ({{#time: n | {{CURRENTTIMESTAMP}}}} = {{#time: n | {{{1}}}}} && {{#time: j | {{CURRENTTIMESTAMP}}}} < {{#time: j | {{{1}}}}}))) }}
            | 0
<!-- Calculate the age based on the provided date of birth -->
            | {{#ifexpr: {{#time:d | {{CURRENTTIMESTAMP}}}} < {{#time:d | {{{1}}}}}
                | 1
                | 0
            }}
        }}
    }}
}}

2023년 12월 28일 (목) 14:04 기준 최신판

수식 오류: 예상치 못한 < 연산자입니다.