Jump to content

Template:Retrieved/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Undid revision 1252320204 by 204.19.162.34 (talk)
re: time var subst (try 2)
Line 6: Line 6:
|#default={{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">access-info</span></strong> – option not valid &#91;&#8288;[[Template:Retrieved/sandbox#access-info|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}}}</span>{{#if:{{{access-info|}}}|{{#if:{{{source-info|}}}|{{#if:{{{nopun|}}}|{{#ifeq:{{{nopun}}}|y||&#8288;.}}|{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,}}{{#ifeq:{{{mode}}}|cs1|.}}}}}}&#32;{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}|{{#if:{{{source-info|}}}|{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|({{{format}}}){{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}}}}}{{#if:{{{mode|}}}|{{#ifeq:{{{mode}}}|cs2|retrieved|{{#ifeq:{{{mode}}}|cs1|Retrieved|{{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">mode</span></strong> – option not valid &#91;&#8288;[[Template:Retrieved/sandbox#mode|info]]&#8288;&#93;&#160;<strong>!</strong></span>|Retrieved}}}}}}|Retrieved}}&#32;{{#switch:{{{access-date|{{{accessdate}}}}}}
|#default={{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">access-info</span></strong> – option not valid &#91;&#8288;[[Template:Retrieved/sandbox#access-info|info]]&#8288;&#93;&#160;<strong>!</strong></span>}}}}}}</span>{{#if:{{{access-info|}}}|{{#if:{{{source-info|}}}|{{#if:{{{nopun|}}}|{{#ifeq:{{{nopun}}}|y||&#8288;.}}|{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,}}{{#ifeq:{{{mode}}}|cs1|.}}}}}}&#32;{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}|{{#if:{{{source-info|}}}|{{{source-info}}}{{#if:{{{format|}}}|&#32;({{{format}}})}}{{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;|{{#if:{{{format|}}}|({{{format}}}){{#if:{{{mode|}}}|&#8288;{{#ifeq:{{{mode}}}|cs2|,|{{#ifeq:{{{mode}}}|cs1|.|}}}}|&#8288;.}}&#32;}}}}}}{{#if:{{{mode|}}}|{{#ifeq:{{{mode}}}|cs2|retrieved|{{#ifeq:{{{mode}}}|cs1|Retrieved|{{#ifeq:{{{err}}}|y|<span style="color:red"><strong>!</strong>&#160;{{tlx|retrieved}}:&#32;Parameter <strong><span style="color:green">mode</span></strong> – option not valid &#91;&#8288;[[Template:Retrieved/sandbox#mode|info]]&#8288;&#93;&#160;<strong>!</strong></span>|Retrieved}}}}}}|Retrieved}}&#32;{{#switch:{{{access-date|{{{accessdate}}}}}}
|ymd
|ymd
|iso={{{{{|safesubst:CURRENTYEAR}}}}}-{{{{{|safesubst:CURRENTMONTH}}}}}-{{{{{|safesubst:CURRENTDAY2}}}}}
|iso={{{{{|safesubst:}}}#time:Y-m-d}}
|dmy={{{{{|safesubst:CURRENTDAY}}}}} {{{{{|safesubst:CURRENTMONTHNAME}}}}} {{{{{|safesubst:CURRENTYEAR}}}}}
|dmy={{{{{|safesubst:}}}#time:j F Y}}
|sdmy={{{{{|safesubst:CURRENTDAY}}}}} {{{{{|safesubst:CURRENTMONTHABBREV}}}}} {{{{{|safesubst:CURRENTYEAR}}}}}
|sdmy={{{{{|safesubst:}}}#time:j M Y}}
|mdy={{{{{|safesubst:CURRENTMONTHNAME}}}}} {{{{{|safesubst:CURRENTDAY}}}}}, {{{{{|safesubst:CURRENTYEAR}}}}}
|mdy={{{{{|safesubst:}}}#time:F j, Y}}
|smdy={{{{{|safesubst:CURRENTMONTHABBREV}}}}} {{{{{|safesubst:CURRENTDAY}}}}}, {{{{{|safesubst:CURRENTYEAR}}}}}
|smdy={{{{{|safesubst:}}}#time:M j, Y}}
|#default={{#iferror:{{#ifexpr: {{#time:U|{{{access-date|{{{accessdate}}}}}}}} <= {{#time:U|now+14 hours}}|{{#if:{{{df|}}}|{{#switch:{{{df}}}
|#default={{#iferror:{{#ifexpr: {{#time:U|{{{access-date|{{{accessdate}}}}}}}} <= {{#time:U|now+14 hours}}|{{#if:{{{df|}}}|{{#switch:{{{df}}}
|ymd
|ymd
Line 416: Line 416:
{{notelist|refs=
{{notelist|refs=
{{efn|name=xdate|1=Examples use this page's current timestamp to format dates (at [[UTC+00:00]] {{as of|2024-10-15|lc=y}}). Tomorrow's date may temporarily display as a result, depending on the local timezone, time of day and Wikipedia system settings.}}
{{efn|name=xdate|1=Examples use this page's current timestamp to format dates (at [[UTC+00:00]] {{as of|2024-10-15|lc=y}}). Tomorrow's date may temporarily display as a result, depending on the local timezone, time of day and Wikipedia system settings.}}
{{efn|name=subst|1=Today's date is [[WP:SAFESUBST|safe-substituted]] using [[mw:Help:Magic words#Date and time|relevant magic words]].}}
{{efn|name=subst|1=Today's date is [[WP:SAFESUBST|safe-substituted]] using [[mw:Help:Extension:ParserFunctions##time|relevant parser functions]].}}
{{efn|name=tzone|1=The parser treats timestamps up to and including 38 hours beyond the current [[UTC]] datestamp, i.e. the 24-hour-day plus the [[UTC+14|maximum forward UTC offset]], as "today" based on the current ([[en:]]) system timezone setting.}}
{{efn|name=tzone|1=The parser treats timestamps up to and including 38 hours beyond the current [[UTC]] datestamp, i.e. the 24-hour-day plus the [[UTC+14|maximum forward UTC offset]], as "today" based on the current ([[en:]]) system timezone setting.}}
{{efn|name=sfn|1=The full citation's retrieval information may not apply to short citations. Specific in-source locations may have different access and/or retrieval requirements. Depending on either the full or short citation's access date, the state of the respective external links and/or the source content and relevance may vary.}}
{{efn|name=sfn|1=The full citation's retrieval information may not apply to short citations. Specific in-source locations may have different access and/or retrieval requirements. Depending on either the full or short citation's access date, the state of the respective external links and/or the source content and relevance may vary.}}

Revision as of 00:57, 21 October 2024

Retrieved 2025-01-05⁠.