模板:Time-context

{{#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}}|| }}