「Template:要検証/dateHandler」の版間の差分
編集の要約なし |
戻し |
||
1行目: | 1行目: | ||
{{#if:{{{1|}}} |
{{#if:{{{1|}}} |
||
|{{#switch:{{ |
|{{#switch:{{Checkdate|getY4={{{1}}}}} |
||
|2007|2008=2008年以前{{#switch:{{ |
|2007|2008=2008年以前{{#switch:{{Checkdate|getM1={{{1}}}}}|1|2|3|4|5|6|7|8|9|A|B|C=|#default=_月}} |
||
|2009=2009年{{#switch:{{ |
|2009=2009年{{#switch:{{Checkdate|getM1={{{1}}}}}|1|2|3|4|5|6|7|8|9|A|B|C=|#default=_月}} |
||
|2010=2010年{{#switch:{{ |
|2010=2010年{{#switch:{{Checkdate|getM1={{{1}}}}} |
||
|1|2|3|4|5|6=1月-6月|7|8|9|A|B|C=7月-12月|#default=_月}} |
|1|2|3|4|5|6=1月-6月|7|8|9|A|B|C=7月-12月|#default=_月}} |
||
|2011=2011年{{#switch:{{ |
|2011=2011年{{#switch:{{Checkdate|getM1={{{1}}}}} |
||
|1|2|3|4|5|6=1月-6月|7|8|9|A|B|C=7月-12月|#default=_月}} |
|1|2|3|4|5|6=1月-6月|7|8|9|A|B|C=7月-12月|#default=_月}} |
||
|#default={{{1}}} |
|#default={{Checkdate|{{{1}}}}}}} |
||
|{{#if:{{{2|}}}|{{Checkdate|getM1={{{2}}}|year-min=2009|year-max=2011}}|}} |
|||
}} |
|||
|{{#switch:{{{Y4|}}}|2009|2010|2011={{{M1|}}}|#default=}} |
|||
}}<noinclude> |
}}<noinclude> |
||
* パラメータ '''1''' に年月を指定した場合は当該サブカテゴリ名の末尾を返します。 |
* パラメータ '''1''' に年月を指定した場合は当該サブカテゴリ名の末尾を返します。 |
||
** 年が指定されていて月が正しく指定されていない場合は {{Tl|DMC/core}}で検出させるために 「_月」を返します。 |
** 年が指定されていて月が正しく指定されていない場合は {{Tl|DMC/core}}で検出させるために 「_月」を返します。 |
||
* パラメータ ''' |
* パラメータ '''2''' に年月を指定した場合は月を1文字で返します。10月は A、11月は B、12月は C を返します。 |
||
** 月別分類をしない年 および 1箇月単位で分類する年については何も返しません。 |
** 月別分類をしない年 および 1箇月単位で分類する年については何も返しません。 |
||
[[Category:内部テンプレート]]</noinclude> |
[[Category:内部テンプレート]]</noinclude> |