Difference between revisions of "Template:Date"

From WikiChem
Jump to: navigation, search
m (last non anonymous edit copy)
 
(Updating from http://en.wikipedia.org/w/index.php?title=Template:Date&oldid=378664432)
Line 1: Line 1:
<includeonly>{{{{#ifeq:{{</includeonly><includeonly>subst:</includeonly><includeonly>void}}|{{void}}|{{#ifeq:{{NAMESPACE}}|Template|void|Echo}}|void}}|1=<span style="font-size:large; color:red;">'''<nowiki>{{</nowiki>date<nowiki>}}</nowiki> must not be [[Wikipedia:Template substitution|substituted]]. Use <span style="color:green;"><nowiki>{{subst:</nowiki>[[Template:today|today]]<nowiki>}}</nowiki></span> instead.'''</span>}}<includeonly><span class="wpAutoDate">{{#iferror:{{#time: Y|{{{1|einval}}} }}
+
{{{{{|safesubst:}}}#switch:none
  |{{{1|{{ #time:j F Y| }}}}}
+
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#time:Y_M_d|{{{1|}}} }} | none }} <noinclude><!-- #time: can't handle --></noinclude>
  |{{#time:{{#ifeq:{{#time:Y|{{{1|einval}}} 2000}}|{{#time:Y|{{{1|einval}}} 2001}}|j F Y|j F}}|{{{1|einval}}} }}<!-- -->}}</span></includeonly><noinclude>
+
|{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#expr: {{{1|}}}+0 }}
<!--  
+
    |<noinclude><!--not a pure number--></noinclude>
** The reformatting stuff is temporary and pending resolution of bug #4582.
+
    |{{{{{|safesubst:}}}#ifexpr: {{{1|}}}+0 > 10000000000000
** It would not have been necessary at the moment either if someone didn't
+
      |<noinclude><!-- a yyyymmddhhmmss timestamp --></noinclude>
** "urgently" need to have dates reformatted.
+
      |{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}#expr:{{{1|}}}+0}} | {{{1|}}}
** A handler for wpAutoDate is in the works. PLEASE BE PATIENT.
+
          | none <noinclude><!-- pure number eg 123.456 --></noinclude>
-->
+
          | <noinclude><!-- assume yy-mm-dd --></noinclude>
{{template doc}}
+
        }}
<!-- Add cats and interwikis to the /doc subpage, not here! -->
+
    }}
 +
  }}
 +
|{{{{{|safesubst:}}}#switch:  {{lc:{{{2|}}}}} | none | asis=none }}
 +
|{{{{{|safesubst:}}}#ifexpr:  {{{{{|safesubst:}}}#time:Y|{{{1|}}} }} < 1000 | none }}
 +
|{{{{{|safesubst:}}}#switch:  {{{{{|safesubst:}}}#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
 +
|= {{{1|}}}<noinclude><!-- error or "none", so no formatting --></noinclude>
 +
|<noinclude><!-- continue with formatting --></noinclude>
 +
  {{{{{|safesubst:}}}#ifeq:<noinclude><!--
 +
    --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2008}}<noinclude><!--
 +
    --></noinclude>{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#ifexpr: {{{1}}}>10000000000000 | no }} | }}<noinclude><!--
 +
    --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2004}}
 +
  |20082004
 +
  |<noinclude><!-- no year --></noinclude>
 +
    {{{{{|safesubst:}}}#ifeq:{{{{{|safesubst:}}}#time:d|{{{1}}} 2036}}|{{{{{|safesubst:}}}#time:d|{{{1}}} }}
 +
    |<noinclude><!-- month+day --></noinclude>{{{{{|safesubst:}}}#time:
 +
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
 +
      | lmdy | liso | lymd      = [[:F j]]
 +
      | mdy  | iso  | ymd      = F j
 +
      | ldmy | l                = [[:j F]]
 +
      | #default                = j F
 +
      }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy' or null or "" or unsupported option --></noinclude>
 +
    |<noinclude><!-- month only --></noinclude>{{{{{|safesubst:}}}#time:
 +
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
 +
      | lmdy | liso | lymd
 +
      | ldmy | l                = [[F]]
 +
      | #default                = F
 +
      }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy'/'mdy'/'ymd'/'iso'/null/""/unsupported opt --></noinclude>
 +
    }}
 +
  |<noinclude><!-- with year--></noinclude>
 +
    {{{{{|safesubst:}}}#if: {{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2 {{{1|}}}}}|*D*|{{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2000 {{{1|}}}}}|*D*| }}}}
 +
    |<noinclude><!-- day+month+year --></noinclude>{{{{{|safesubst:}}}#time:
 +
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
 +
      | lmdy                    = [[:F j]], [[Y]]
 +
      | mdy                    = F j, Y
 +
      | liso                    = [[Y|Y-]][[F j|m-d]]<noinclude><!-- i.e. [[Y-m-d]] --></noinclude>
 +
      | iso                    = Y-m-d
 +
      | lymd                    = [[Y]] [[:F j]]
 +
      | ymd                    = Y F j
 +
      | ldmy | l                = [[:j F]] [[Y]]
 +
      | #default                = j F Y
 +
      }}|{{{1|}}} }}<noinclude><!-- #default='dmy' or null or "" or unsupported option --></noinclude>
 +
    |<noinclude><!-- month+year --></noinclude>{{{{{|safesubst:}}}#time:
 +
      {{{{{|safesubst:}}}#switch: {{lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
 +
      | lmdy | liso | lymd | ldmy | l  = [[:F Y]]
 +
      | #default                = F Y
 +
      }}|{{{1|}}} }}<noinclude><!-- default='dmy'/'iso'/'mdy'/null/""/unsupported option --></noinclude>
 +
    }}
 +
  }}   
 +
}}<noinclude>
 +
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 05:55, 21 August 2010

22 November 2024

[edit] [purge] Template-info-500px.png Template documentation


Usage

Parameters

Examples

See also

Error creating thumbnail: Unable to save thumbnail to destination
Wikipedia-logo.png This template was originally imported from Wikipedia, specifically this version of the template "Template:Date". Please see the history page on Wikipedia for the original authors. This WikiChem template may have been modified since it was imported. It is licensed under the Creative Commons Attribution–Share Alike 3.0 Unported license.