Template:Date: Difference between revisions

From IxWiki
Jump to navigation Jump to search
>SiBr4
Moved sandbox live to fix wrong output when substituted
 
m 1 revision imported
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{{{{|safesubst:}}}#switch:none
{{safesubst:<noinclude/>#switch:none
  |{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#time:Y_M_d|{{{1|}}} }} | none }} <noinclude><!-- #time: can't handle --></noinclude>
  |{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#time:Y_M_d|{{{1|}}} }} | none }} <noinclude><!-- #time: can't handle --></noinclude>
  |{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#expr: {{{1|}}}+0 }}
  |{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#expr: {{{1|}}}+0 }}
     |<noinclude><!--not a pure number--></noinclude>
     |<noinclude><!--not a pure number--></noinclude>
     |{{{{{|safesubst:}}}#ifexpr: {{{1|}}}+0 > 10000000000000
     |{{safesubst:<noinclude/>#ifexpr: {{{1|}}}+0 > 10000000000000
       |<noinclude><!-- a yyyymmddhhmmss timestamp --></noinclude>
       |<noinclude><!-- a yyyymmddhhmmss timestamp --></noinclude>
       |{{{{{|safesubst:}}}#ifeq: {{{{{|safesubst:}}}#expr:{{{1|}}}+0}} | {{{1|}}}
       |{{safesubst:<noinclude/>#ifeq: {{safesubst:<noinclude/>#expr:{{{1|}}}+0}} | {{{1|}}}
           | none <noinclude><!-- pure number eg 123.456 --></noinclude>
           | none <noinclude><!-- pure number eg 123.456 --></noinclude>
           | <noinclude><!-- assume yy-mm-dd --></noinclude>
           | <noinclude><!-- assume yy-mm-dd --></noinclude>
Line 11: Line 11:
     }}
     }}
   }}
   }}
  |{{{{{|safesubst:}}}#switch:  {{{{{|safesubst:}}}lc:{{{2|}}}}} | none | asis | link | lnone =none }}
  |{{safesubst:<noinclude/>#switch:  {{safesubst:<noinclude/>lc:{{{2|}}}}} | none | asis | link | lnone =none }}
  |{{{{{|safesubst:}}}#ifexpr:  {{{{{|safesubst:}}}#time:Y|{{{1|}}} }} < 1000 | none }}
  |{{safesubst:<noinclude/>#ifexpr:  {{safesubst:<noinclude/>#time:Y|{{{1|}}} }} < 1000 | none }}
  |{{{{{|safesubst:}}}#switch:  {{{{{|safesubst:}}}#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
  |{{safesubst:<noinclude/>#switch:  {{safesubst:<noinclude/>#time:Ynj|{{{1|}}} }}|100031|110031|130031|140031|150031=none}}
  |= {{{{{|safesubst:}}}#if:{{{1|}}}
  |= {{safesubst:<noinclude/>#if:{{{1|}}}
       |{{{{{|safesubst:}}}#switch:{{{2}}}
       |{{safesubst:<noinclude/>#switch:{{{2}}}
         |link|lnone|l=[[{{{1}}}]]
         |link|lnone|l=[[{{{1}}}]]
         |{{{1}}}
         |{{{1}}}
Line 21: Line 21:
     }}<noinclude><!-- error or "none", so no formatting --></noinclude>
     }}<noinclude><!-- error or "none", so no formatting --></noinclude>
  |<noinclude><!-- continue with formatting --></noinclude>
  |<noinclude><!-- continue with formatting --></noinclude>
   {{{{{|safesubst:}}}#ifeq:<noinclude><!--
   {{safesubst:<noinclude/>#ifeq:<noinclude><!--
     --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2008}}<noinclude><!--
     --></noinclude>{{safesubst:<noinclude/>#time:Y|{{{1}}} 2008}}<noinclude><!--
     --></noinclude>{{{{{|safesubst:}}}#iferror: {{{{{|safesubst:}}}#ifexpr: {{{1}}}>10000000000000 | no }} | }}<noinclude><!--
     --></noinclude>{{safesubst:<noinclude/>#iferror: {{safesubst:<noinclude/>#ifexpr: {{{1}}}>10000000000000 | no }} | }}<noinclude><!--
     --></noinclude>{{{{{|safesubst:}}}#time:Y|{{{1}}} 2004}}
     --></noinclude>{{safesubst:<noinclude/>#time:Y|{{{1}}} 2004}}
   |20082004
   |20082004
   |<noinclude><!-- no year --></noinclude>
   |<noinclude><!-- no year --></noinclude>
     {{{{{|safesubst:}}}#ifeq:{{{{{|safesubst:}}}#time:d|{{{1}}} 2036}}|{{{{{|safesubst:}}}#time:d|{{{1}}} }}
     {{safesubst:<noinclude/>#ifeq:{{safesubst:<noinclude/>#time:d|{{{1}}} 2036}}|{{safesubst:<noinclude/>#time:d|{{{1}}} }}
     |<noinclude><!-- month+day --></noinclude>{{{{{|safesubst:}}}#time:
     |<noinclude><!-- month+day --></noinclude>{{safesubst:<noinclude/>#time:
       {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       {{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       | lmdy | liso | lymd      = [[:F j]]
       | lmdy | liso | lymd      = [[:F j]]
       | mdy  | iso  | ymd      = F j
       | mdy  | iso  | ymd      = F j
Line 35: Line 35:
       | #default                = j F
       | #default                = j F
       }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy' or null or "" or unsupported option --></noinclude>
       }}|{{{1}}} 2000 }}<noinclude><!-- default='dmy' or null or "" or unsupported option --></noinclude>
     |<noinclude><!-- month only --></noinclude>{{{{{|safesubst:}}}#time:
     |<noinclude><!-- month only --></noinclude>{{safesubst:<noinclude/>#time:
       {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       {{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       | lmdy | liso | lymd  
       | lmdy | liso | lymd  
       | ldmy | l                = [[F]]
       | ldmy | l                = [[F]]
Line 43: Line 43:
     }}
     }}
   |<noinclude><!-- with year--></noinclude>
   |<noinclude><!-- with year--></noinclude>
     {{{{{|safesubst:}}}#if: {{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2 {{{1|}}}}}|*D*|{{{{{|safesubst:}}}#iferror:{{{{{|safesubst:}}}#time:j|2000 {{{1|}}}}}|*D*| }}}}
     {{safesubst:<noinclude/>#if: {{safesubst:<noinclude/>#iferror:{{safesubst:<noinclude/>#time:j|2 {{{1|}}}}}|*D*|{{safesubst:<noinclude/>#iferror:{{safesubst:<noinclude/>#time:j|2000 {{{1|}}}}}|*D*| }}}}
     |<noinclude><!-- day+month+year --></noinclude>{{{{{|safesubst:}}}#time:
     |<noinclude><!-- day+month+year --></noinclude>{{safesubst:<noinclude/>#time:
       {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       {{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       | lmdy                    = [[:F j]], [[Y]]
       | lmdy                    = [[:F j]], [[Y]]
       | mdy                    = F j, Y
       | mdy                    = F j, Y
Line 55: Line 55:
       | #default                = j F Y
       | #default                = j F Y
       }}|{{{1|}}} }}<noinclude><!-- #default='dmy' or null or "" or unsupported option --></noinclude>
       }}|{{{1|}}} }}<noinclude><!-- #default='dmy' or null or "" or unsupported option --></noinclude>
     |<noinclude><!-- month+year --></noinclude>{{{{{|safesubst:}}}#time:
     |<noinclude><!-- month+year --></noinclude>{{safesubst:<noinclude/>#time:
       {{{{{|safesubst:}}}#switch: {{{{{|safesubst:}}}lc: {{{{{|safesubst:}}}#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       {{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc: {{safesubst:<noinclude/>#ifeq:{{{3|}}}|y|L}}{{{2|}}} }}
       | lmdy | liso | lymd | ldmy | l  = [[:F Y]]
       | lmdy | liso | lymd | ldmy | l  = [[:F Y]]
       | #default                = F Y
       | #default                = F Y

Latest revision as of 00:58, 5 January 2023

22 November 2024