Editing Template:ExpiringSoon

From Fallen London Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
<!--
 
<!--
 +
  Handle various date precisions
 +
-->{{#if: {{{Year|}}}<!--
 +
-->| {{#if: {{{Month|}}}<!--
 +
  -->| {{#if: {{{Day|}}}<!--
 +
        Note the date parser dislikes unpadded days
 +
    -->| {{#vardefine:expirydate | {{#expr:{{#time:Ym|{{{Year|}}}-{{{Month|}}}}}*100 + {{{Day|}}}}}}}<!--
 +
      -->{{#vardefine:displaydate | on {{#time:j F Y|{{#expr:{{#time:Ym|{{{Year|}}}-{{{Month|}}}}}*100 + {{{Day|}}}}}}}}}<!--
 +
      -->{{#vardefine:displayafter | <nowiki /> after that date}}<!--
 +
     
 +
    -->| {{#vardefine:expirydate | {{#time:Ym|{{{Year|}}}-{{{Month|}}}}}99 }}<!--
 +
      -->{{#vardefine:displaydate | in {{#time:F Y|{{{Year|}}}-{{{Month|}}}}}}}<!--
 +
      -->{{#vardefine:displayafter | <nowiki /> after that}}<!--
 +
    -->}}<!--
 +
   
 +
  -->| {{#vardefine:expirydate | {{{Year|}}}9999 }}<!--
 +
    -->{{#vardefine:displaydate | in {{{Year|}}}}}<!--
 +
    -->{{#vardefine:displayafter | <nowiki /> after that}}<!--
 +
  -->}}<!--
 +
-->| {{#vardefine:expirydate | 99999999 }}<!--
 +
  -->{{#vardefine:displaydate | soon}}<!--
 +
  -->{{#vardefine:displayafter | }}<!--
 +
-->}}<!--
  
 
Has the expiry date passed?
 
Has the expiry date passed?
 
+
-->{{#ifexpr: {{#time:Ymd}} < {{#var:expirydate}}<!--
-->{{#ifexpr: {{#time:Ymd}} < <!--
+
   If not, display this template
 
 
  [Build numerical expression for expiry date]
 
  -->{{#if: {{{Year|}}}<!--
 
   -->| {{#if: {{{Month|}}}<!--
 
    -->| {{#if: {{{Day|}}}<!--
 
      -->| {{#expr:{{#time:Ym|{{{Year|}}}-{{{Month|}}}}}*100 + {{{Day|}}}}}<!-- (The #time parser dislikes unpadded days, hence the weird expression)
 
      -->| {{#time:Ym|{{{Year|}}}-{{{Month|}}}}}99 <!--
 
      -->}}<!--
 
    -->| {{{Year|}}}9999 <!--
 
    -->}}<!--
 
  -->| 99999999 <!--
 
  -->}}<!--
 
  [End numerical expression for expiry date]
 
 
 
If not, display this template:
 
 
 
 
-->|<!--
 
-->|<!--
 
-->{{{!}} data-flw-theme="dark" style="background:#0e0e0e; color:#f7fdfa; border:2px solid #d52525;" cellpadding=8
 
-->{{{!}} data-flw-theme="dark" style="background:#0e0e0e; color:#f7fdfa; border:2px solid #d52525;" cellpadding=8
 
{{!}}- style="vertical-align: middle;"
 
{{!}}- style="vertical-align: middle;"
 
{{!}} style="min-width:50px;" {{!}} [[File:Calendar2.png|50px|link=]]
 
{{!}} style="min-width:50px;" {{!}} [[File:Calendar2.png|50px|link=]]
{{!}} style="color:#d52525;" {{!}} '''''Due to forthcoming changes to Fallen London, this {{#ifeq: {{{Section|}}} | yes | section | page |}} is expected to become outdated <!--
+
{{!}} style="color:#d52525;" {{!}} '''''Due to forthcoming changes to Fallen London, this {{#ifeq: {{{Section|}}} | yes | section | page |}} is expected to become outdated {{#var:displaydate}}. It should be used with caution{{#var:displayafter}}.'''''<!--
 
 
  [Build display date]
 
  -->{{#if: {{{Year|}}}<!--
 
  -->| {{#if: {{{Month|}}}<!--
 
    -->| {{#if: {{{Day|}}}<!--
 
      -->| on {{#time:j F Y|{{#expr:{{#time:Ym|{{{Year|}}}-{{{Month|}}}}}*100 + {{{Day|}}}}}}} <!--
 
      -->| in {{#time:F Y|{{{Year|}}}-{{{Month|}}}}} <!--
 
      -->}}<!--
 
    -->| in {{{Year|}}} <!--
 
    -->}}<!--
 
  -->| soon <!--
 
  -->}}<!--
 
  [End display date]
 
 
 
-->. It should be used with caution<!--
 
 
 
  [Build "after ..."]
 
  -->{{#if: {{{Year|}}}<!--
 
  -->| {{#if: {{{Month|}}}<!--
 
    -->| {{#if: {{{Day|}}}<!--
 
      -->| <nowiki /> after that date <!--
 
      -->| <nowiki /> after that <!--
 
      -->}}<!--
 
    -->| <nowiki /> after that <!--
 
    -->}}<!--
 
  -->| <!-- blank if no date at all
 
  -->}}<!--
 
  [End "after ..."]
 
 
 
-->.'''''<!--
 
 
-->{{#if: {{{Detail|}}} |<nowiki />
 
-->{{#if: {{{Detail|}}} |<nowiki />
 
{{!}}-
 
{{!}}-
Line 60: Line 36:
 
{{!}}}[[Category:Guides Expiring Soon]]<!--
 
{{!}}}[[Category:Guides Expiring Soon]]<!--
  
Otherwise, delegate to [[Template:Outdated]]:
+
  Otherwise, delegate to [[Template:Outdated]]
 
 
 
-->| {{Outdated|Section={{{Section|}}}}} }}
 
-->| {{Outdated|Section={{{Section|}}}}} }}
 
<noinclude>[[Category:Article management templates]]{{Documentation}}</noinclude>
 
<noinclude>[[Category:Article management templates]]{{Documentation}}</noinclude>

Please note that all contributions to Fallen London Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Fallen London Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)
Preview page with this template