모듈:연령/의사

Module

지원되는 템플릿

모듈: Age는 다음 템플릿을 구현합니다.

템플릿 필수 Wikitext
{{filename}} {{#invoke:age extract}}
{{연재일자}} {{#invoke:age gsd}}
{{time interval}} {{#invoke:age time_interval}}
{{age in days}} {{#invoke:age age_generic template=age_days}}
{{nts}일수}} {{#invoke:age age_generic template=age_days_nts}}
{{일후}}}개 {{#invoke:age age_generic template=duration_days}}
{{nts}일수}} {{#invoke:age age_generic template=duration_days_nts}}
{{age}} {{#invoke:age age_generic template=age_full_years}}
{{age nts}}: {{#invoke:age age_generic template=age_full_years_nts}}
{{연령(년)}}} {{#invoke:age age_generic template=age_in_years}}
{{nts}년 나이}} {{#invoke:age age_generic template=age_in_years_nts}}
{{유아 연령}} {{#invoke:age age_generic template=age_infant}}
{{월령}}} {{#invoke:age age_generic template=age_m}}
{{age in weeks}}} {{#invoke:age age_generic template=age_w}}
{{주·일 단위로 숙성}} {{#invoke:age age_generic template=age_wd}}
{{년일수}}년}년 {{#invoke:age age_generic template=age_yd}}
{{년 일수 nts}}: {{#invoke:age age_generic template=age_yd_nts}}
{{년 월령}}} {{#invoke:age age_generic template=age_ym}}
{{년, 월, 단위로 나이}} {{#invoke:age age_generic template=age_ymd}}
{{년, 월, 주, 단위로 나이}} {{#invoke:age age_generic template=age_ymwd}}
{{생년월일 연령}} {{#invoke:age birth_date_and_age}}
{{사망일시}}} {{#invoke:age death_date_and_age}}

리다이렉트

템플릿 리다이렉트
{{ayd}}} {{년 일수 nts}}:
{{hla}} {{년, 월, 단위로 나이}}
{{월, 주, 일 단위로}}} {{년, 월, 주, 단위로 나이}}
{{bda}} {{생년월일 연령}}
{{dda}} {{사망일시}}}
{{gsd}} {{연재일자}}

에이징 템플릿에서는 오래된 날짜가 첫 번째 날짜여야 합니다.의 실장age_in_years그리고.age_in_years_nts그렇지 않으면 에러 메시지를 표시합니다.다른 템플릿에도 동일한 체크가 필요한 경우negative=error를 호출에 추가할 수 있습니다.예를 들어 {{age}}은(는) 다음을 사용할 수 있습니다.

  • {{#invoke:age age_generic template=age_full_years negative=error}}

한다면negative=error적용되지 않습니다. 음의 차이가 마이너스 기호(-)로 표시됩니다.

날짜 형식

날짜에는 숫자 또는 명명된 매개 변수를 사용하여 년/월/일을 지정할 수 있습니다.또는 다양한 형식으로 전체 날짜를 입력할 수 있습니다.예를 들어 다음과 같습니다.

  • {{age in years and months year1=2001 month1=1 day1=10 year2=2012 month2=2 day2=20}}→ 11년 1개월
  • {{age in years and months year=2001 month=1 day=10 year2=2012 month2=2 day2=20}}→ 11년 1개월
  • {{age in years and months 2001 1 10 2012 2 20}}→ 11년 1개월
  • {{age in years and months 2001-1-10 2012-2-20}}→ 11년 1개월
  • {{age in years and months 10 Jan 2001 20 Feb 2012}}→ 11년 1개월
  • {{age in years and months January 10, 2001 Feb 20, 2012}}→ 11년 1개월

첫 번째 또는 두 번째 날짜를 생략하면 현재 날짜가 사용됩니다.예를 들어 다음과 같습니다.

  • {{age in years and months year2=2012 month2=2 day2=20}}→ -11년 1개월
  • {{age in years and months 2012 2 20}}→ -11년 1개월
  • {{age in years and months 2012-2-20}}→ -11년 1개월
  • {{age in years and months 20 Feb 2012}}→ -11년 1개월
  • {{age in years and months Feb 20, 2012}}→ -11년 1개월
  • {{age in years and months year1=2001 month1=1 day1=10}}→ 22년 2개월
  • {{age in years and months year=2001 month=1 day=10}}→ 22년 2개월
  • {{age in years and months 2001 1 10}}→ 22년 2개월
  • {{age in years and months 2001-1-10}}→ 22년 2개월
  • {{age in years and months 10 Jan 2001}}→ 22년 2개월
  • {{age in years and months January 10, 2001}}→ 22년 2개월

파라미터

다음 옵션을 사용할 수 있습니다.

파라미터 묘사
duration=on 종료일이 결과에 포함되므로 연령에 하루가 추가됩니다.
fix=on 잘못된 시간 단위를 조정합니다.'템플릿' 참조:추출 #수정.
format=commas 1,000 이상의 값은 쉼표로 표시됩니다.
format=raw 숫자는 쉼표 없이 표시되며 음수는 다음에 대해 하이픈과 함께 표시됩니다.{{#expr}}또한 {{age}}는 플레인 숫자를 출력하며 결과가 현재 날짜에 의존하는지 여부를 나타내는 스팬은 포함되지 않습니다.
format=cardinal 5 대신 "5"와 같은 단어를 사용하여 결과 숫자를 표시합니다.이하를 참조해 주세요.
format=ordinal 결과 숫자를 5가 아닌 "fifth"와 같은 단어로 표시합니다.이하를 참조해 주세요.
prefix=text 결과 앞이나 임의의 정렬 키 뒤에 지정된 텍스트를 삽입합니다.예를들면,{{age 23 July 1910 14 July 1976 prefix=about sortable=on}}은 숨겨진 정렬 키 뒤에 "약 65"가 표시됩니다.
range=dash 년만 또는 년과 월만 허용하고 연령 범위를 대시(–)로 표시합니다.
range=yes 년 또는 년/월을 수락하고 범위를 "또는"으로 표시합니다.
range=no 1년 또는 1년/개월만 허용하지만 전체 날짜가 입력된 것처럼 단일 나이만 표시합니다.
round=on 연령은 최하위 시간 단위로 반올림됩니다.
sc=on 시리얼 콤마가 사용됩니다(3개 이상의 값이 표시되는 경우에만 사용 가능).
sc=yes 와 같다sc=on.
show=hide 연령은 표시되지 않습니다.다음과 함께 사용하면 편리할 수 있습니다.sortable=on.
sortable=on 결과 앞에 숨겨진 정렬 키를 삽입합니다(정렬 가능한 테이블에서 사용).
sortable=table 테이블 구문을 사용하여 정렬 키 삽입data-sort-value="value" .
sortable=debug 와 같다sortable=on테스트를 위해 정렬 키가 표시됩니다.
sortable=off 정렬 키가 없습니다({age nts}}와 같은 템플릿의 기본값을 덮어쓸 수 있습니다).

의 사용 예range파라미터는 다음과 같습니다.

  • {{age in years and months year=2001 month=1 year2=2012 month2=2 range=yes}}→ 11년, 0년 또는 1개월
  • {{age in years and months 2001 1 2012 2 range=yes}}→ 11년, 0년 또는 1개월
  • {{age in years and months Jan 2001 Feb 2012 range=yes}}→ 11년, 0년 또는 1개월
  • {{age in years and months Jan 2001 Feb 2012 range=dash}}→ 11년 0-1개월
  • {{age in years and months Jan 2001 Feb 2012 range=no}}→ 11년 1개월 (2001년 1월 1일 ~ 2012년 2월 1일)
  • {{age in years and months 12 Jan 2001 Feb 2012 range=no}}→ 11년 1개월 (2001년 1월 12일 ~ 2012년 2월 12일)
  • {{age in years and months 2001 2012 range=no}} 11년(2001년 1월 1일~2012년 1월 1일)
  • {{age in years and months 2001 23 Feb 2012 range=no}} 11년(2001년 2월 23일 ~ 2012년 2월 23일)

정렬 키는 기간(일) 및 시간이 지정된 경우 하루의 분수를 기준으로 합니다.

  • {{age in years and months 10 Jan 2001 20 Feb 2012 sortable=debug}}7003405800000000000♠11년 1개월
  • {{age in years and months 10 Jan 2001 6:00 am 20 Feb 2012 sortable=debug}}70034058250000000♠11년 1개월
  • {{age in years and months 10 Jan 2001 6:00 am 20 Feb 2012 sortable=debug show=hide}}7003405825000000000♠

일정 기간 동안 하루가 추가됩니다.

  • {{age in years and months 20 Jan 2001 19 Feb 2012}} 11년 (11년 1개월 중 하루 부족)
  • {{age in years and months 20 Jan 2001 19 Feb 2012 duration=on}}→ 11년 1개월

최하위 시간 단위는 반올림할 수 있습니다.

  • {{age in years and months 20 Jan 2001 10 Feb 2012}}→ 11년
  • {{age in years and months 20 Jan 2001 10 Feb 2012 round=on}}→ 11년 1개월 (가장 가까운 달로 반올림)

큰 숫자는 쉼표로 포맷할 수 있습니다.

  • {{age in years and months 120 2012 format=commas range=yes}}→ 1,891년 또는 1,892년
  • {{age in years and months 120 2012 format=commas range=dash}}→ 1,891–1,892년

철자 번호

에서 사용하는 템플릿age_generic는 숫자를 사용하는 대신 단어로 숫자를 표시할 수 있습니다.결과는 기수(예: "5") 또는 서수(예: "5")가 될 수 있습니다.첫 번째 문자는 대문자로 사용할 수 있으며 숫자의 미국식 철자를 사용할 수 있습니다.예:

  • {{age 1898 01 01 2018 02 01 format=cardinal}}→120
  • {{age 1898 01 01 2018 02 01 format=cardinal_us}}→ 120
  • {{age 1898 01 01 2018 02 01 format=Cardinal}}→120개
  • {{age 1898 01 01 2018 02 01 format=Cardinal_us}}→120개
  • {{age 1898 01 01 2018 02 01 format=Ordinal}}→120
  • {{age 1898 01 01 2018 02 01 format=Ordinal_us}}→120
  • {{age 1898 01 01 2018 02 01 format=ordinal}}→120
  • {{age 1898 01 01 2018 02 01 format=ordinal_us}}→120
  • {{age 1980 1990 range=yes format=Cardinal}}→나인 또는 10인
  • {{age in years, months and days April 1980 1995 format=Cardinal range=yes}}→14년 또는 15년

추적 카테고리

현지화

입력 및 출력은 사용하는 언어에 맞게 현지화할 수 있습니다.예를 들어 bnwikibswiki가 있습니다.

「 」를 참조해 주세요.

  • {{time interval}} • 이 템플릿은 모든 연령/기간 계산을 지원하며 단위 생략 및 생략 등의 옵션을 제공합니다.