본문으로 이동

:Title decade/설명문서

위키백과, 우리 모두의 백과사전.

문서 제목에서 연대 숫자 4자리를 뽑아주는 틀입니다. 숫자 뒤 단위인 '~년대'는 따로 붙지 않습니다.

예: '1980년대 대한민국' 문서 -> '1980'이라는 값이 출력.

여러 틀에서의 활용을 위해 '~년대'는 생략하였음을 다시 염두해 두시길 바랍니다. 년대까지 필요한 경우에는 틀 밖에 따로 붙일 수 있습니다. {{Title decade}}년대 대한민국의 스포츠.

사용법[편집]

{{Title decade|match|nomatch|page=}}

{{Title decade|match=|nomatch=|page=}}

page 변수에 제목을 따로 쓸 수도 있습니다.

~년대 표기가 아닐 경우[편집]

문서 제목에 ~년대로 표기되어야 작동됩니다. 일반 연도일 경우에는 작동하지 않습니다.

  • {{Title decade|page=1790년대 조선의 판소리}} → 1790
  • {{Title decade|page=1797년 조선의 판소리}}

그러나 제목으로부터 연도값 네 자리를 도출해내는 {{Title year}}, 연대를 도출해내는 {{DECADE}}을 활용한다면 정상적으로 작동됩니다. {{DECADE|{{Title year}}}}와 같이 감싸서 쓰면 됩니다.

{{Title year|page=1953년 KBS 인기가요}} → 1953
+
{{DECADE|1953}} → 1950년대
=
{{DECADE|{{Title year|page=1953년 KBS 인기가요}}}} → 1950년대

틀데이터[편집]

다음은 시각편집기 및 다른 도구를 위한 틀데이터입니다.

Title decade의 틀데이터

Extracts a 4-digit decade from the current page title. All parameters are optional.

틀 변수

변수설명형식상태
Match Instance1 match

If multiple 4-digit decades are found, this specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1.

기본값
1
숫자선택 사항
No match text2 nomatch

If no 4-digit decades is found, output the "nomatch" value. Defaults to blank.

문자열선택 사항
Override page titlepage

Specified a page title to use other than the current page. If left blank, the template will use the title of the current page

기본값
{{BASEPAGENAME}}
문서 이름선택 사항