模板:Time-context

Ph9讨论 | 贡献2020年12月27日 (日) 14:49的版本 (导入1个版本)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

{{#ifeq:模板|模板||}}

{{#ifeq:{{{small}}}|left|}}{{#ifeq:{{ safesubst:#if:

 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Time-context}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Time-context}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:yes|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Wikipedia articles needing context from 
   ||}}
 |[[Category:{{#if:
              ||Wikipedia articles needing context}}]]}}{{#if:All Wikipedia articles needing context
     |}}}}}}{{#ifeq:{{ safesubst:#if:  
 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Time-context}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Time-context}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:yes|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Wikipedia introduction cleanup from 
   ||}}
 |[[Category:{{#if:
              ||Wikipedia introduction cleanup}}]]}}{{#if:All pages needing cleanup
     |}}}}}}
50px Template documentation[view] [edit] [history] [purge]

{{#ifeq:time-context |doc

    | 

{{#ifeq:show |show

|
        }}{{#if: |
         |   {{#ifexist:模板:Time-context
                  | [[Category:{{#switch:模板 |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

Usage

For use in asking when an event happened.

Example

{{Time-context|section|that I thought ended in April 2010|date=11月 2024}} gives:

{{#ifeq:模板|{{subst:NAMESPACE}}||}}{{#ifeq:{{{small}}}|left|}}{{#ifeq:{{ safesubst:#if:
 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Time-context}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Time-context}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:yes|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Wikipedia articles needing context from 
   ||}}
 |[[Category:{{#if:
              ||Wikipedia articles needing context}}]]}}{{#if:All Wikipedia articles needing context
     |}}}}}}{{#ifeq:{{ safesubst:#if:  
 | {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|模板:Time-context}}|1}}
 | {{ safesubst:#if:|{{{1}}}|模板:Time-context}}

}}|Wikipedia:Template messages||{{#ifexpr:{{#if:模板|0|1}}+{{#ifeq:yes|yes|0|1}}

|{{#if:
 |{{#ifexist:Category:Wikipedia introduction cleanup from 
   ||}}
 |[[Category:{{#if:
              ||Wikipedia introduction cleanup}}]]}}{{#if:All pages needing cleanup
     |}}}}}}

See also

{{#ifeq:模板|Template|* This template contains a self-reference (it refers to Wikipedia in its contents).

  • This template should not be substituted. Bots rely on the transcluded form for dating and categorisation.}}

{{#if:{{#ifeq:Time-co|sandbox|1}}{{#ifeq:Time-context|doc|1}}|| }}