틀:Age: 두 판 사이의 차이

S.T.E.L.L.A.-WIKI
편집 요약 없음
편집 요약 없음
 
(같은 사용자의 중간 판 5개는 보이지 않습니다)
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}}}}}
  {{#expr:
        | 1
     {{#time:Y | {{CURRENTTIMESTAMP}}}} -
        | {{#ifexpr: {{#time:m | {{CURRENTTIMESTAMP}}}} > {{#time:m | {{{1}}}}}
    {{#time:Y | {{{1}}}}} -
            | 0
     ({{#time:m | {{CURRENTTIMESTAMP}}}} < {{#time:m | {{{1}}}}} || ({{#time:m | {{CURRENTTIMESTAMP}}}} = {{#time:m | {{{1}}}}} && {{#time:d | {{CURRENTTIMESTAMP}}}} < {{#time:d | {{{1}}}}})))
            | {{#ifexpr: {{#time:d | {{CURRENTTIMESTAMP}}}} < {{#time:d | {{{1}}}}}
  }} <!-- Calculate the age based on the provided date of birth -->
                | 1
                | 0
            }}
        }}
    }}
}}
}}

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

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