<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://miniscope.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ACategory%2FSchedule_step%2Frow</id>
	<title>Template:Category/Schedule step/row - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://miniscope.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ACategory%2FSchedule_step%2Frow"/>
	<link rel="alternate" type="text/html" href="https://miniscope.org/index.php?title=Template:Category/Schedule_step/row&amp;action=history"/>
	<updated>2026-05-03T15:49:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.5</generator>
	<entry>
		<id>https://miniscope.org/index.php?title=Template:Category/Schedule_step/row&amp;diff=839&amp;oldid=prev</id>
		<title>DAharoni: SchemaSync: sync from repo @ cef7b4698b6a7bf05768b7fe97b5c01c55c4b039</title>
		<link rel="alternate" type="text/html" href="https://miniscope.org/index.php?title=Template:Category/Schedule_step/row&amp;diff=839&amp;oldid=prev"/>
		<updated>2026-05-02T20:08:03Z</updated>

		<summary type="html">&lt;p&gt;SchemaSync: sync from repo @ cef7b4698b6a7bf05768b7fe97b5c01c55c4b039&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
Row renderer for [[Template:Category/Schedule step]] and&lt;br /&gt;
[[Template:Category/Submission/timeline]]. Do not transclude directly.&lt;br /&gt;
&lt;br /&gt;
SMW&amp;#039;s &amp;lt;code&amp;gt;format=template&amp;lt;/code&amp;gt; calls this template once per query&lt;br /&gt;
result. Named-arg params come from the outer &amp;lt;code&amp;gt;#ask&amp;lt;/code&amp;gt;:&lt;br /&gt;
* &amp;lt;code&amp;gt;Step&amp;lt;/code&amp;gt; — sequence number&lt;br /&gt;
* &amp;lt;code&amp;gt;Offset&amp;lt;/code&amp;gt; — numeric offset in days (may be empty)&lt;br /&gt;
* &amp;lt;code&amp;gt;When&amp;lt;/code&amp;gt; — human-readable offset description&lt;br /&gt;
* &amp;lt;code&amp;gt;Action&amp;lt;/code&amp;gt; — action description&lt;br /&gt;
* &amp;lt;code&amp;gt;Audience&amp;lt;/code&amp;gt; — target audience&lt;br /&gt;
* &amp;lt;code&amp;gt;Condition&amp;lt;/code&amp;gt; — condition under which the step applies&lt;br /&gt;
&lt;br /&gt;
Deadline discovery:&lt;br /&gt;
This template looks up &amp;lt;code&amp;gt;Has submission deadline&amp;lt;/code&amp;gt; on&lt;br /&gt;
&amp;lt;code&amp;gt;{{FULLPAGENAME}}&amp;lt;/code&amp;gt; — which resolves to the page currently&lt;br /&gt;
being rendered (e.g. a Category:Submission page), not the template page.&lt;br /&gt;
This avoids relying on SMW&amp;#039;s &amp;lt;code&amp;gt;userparam&amp;lt;/code&amp;gt; mechanism, which is&lt;br /&gt;
not honored consistently across SMW versions.&lt;br /&gt;
&lt;br /&gt;
Rendering:&lt;br /&gt;
* On a page with &amp;lt;code&amp;gt;Has submission deadline&amp;lt;/code&amp;gt; set&lt;br /&gt;
  (a Submission page) and a numeric &amp;lt;code&amp;gt;Offset&amp;lt;/code&amp;gt;, renders the&lt;br /&gt;
  computed date (&amp;lt;code&amp;gt;deadline + Offset days&amp;lt;/code&amp;gt;) plus a&lt;br /&gt;
  parenthetical countdown and a Status bucket (&amp;quot;done&amp;quot;, &amp;quot;▶ now&amp;quot;, &amp;quot;soon&amp;quot;,&lt;br /&gt;
  or &amp;quot;future&amp;quot;).&lt;br /&gt;
* On such a page but with no numeric offset (early-process steps),&lt;br /&gt;
  renders em-dashes.&lt;br /&gt;
* On a page without &amp;lt;code&amp;gt;Has submission deadline&amp;lt;/code&amp;gt;&lt;br /&gt;
  (e.g. a Schedule template page), renders the raw offset as &amp;quot;-10 days&amp;quot;&lt;br /&gt;
  in the Date column and an em-dash in the Status column.&lt;br /&gt;
&lt;br /&gt;
Date arithmetic uses Unix timestamps to sidestep sign/format ambiguity&lt;br /&gt;
in date strings: the deadline is parsed to a timestamp, the offset is&lt;br /&gt;
added as seconds, and the result is formatted back to Y-m-d.&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;|-&lt;br /&gt;
| {{{Step|}}}&lt;br /&gt;
| {{#if:{{#show:{{FULLPAGENAME}}|?Has submission deadline}}&lt;br /&gt;
    |{{#if:{{{Offset|}}}&lt;br /&gt;
      |{{#time: Y-m-d | @{{#expr: {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 }} }} ({{#ifexpr:&lt;br /&gt;
          {{#expr: {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 - {{#time:U}} }} &amp;gt;= 0&lt;br /&gt;
          |{{#expr: ( {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 - {{#time:U}} ) / 86400 round 0 }} days left&lt;br /&gt;
          |past&lt;br /&gt;
        }})&lt;br /&gt;
      |&amp;amp;mdash;&lt;br /&gt;
    }}&lt;br /&gt;
    |{{#if:{{{Offset|}}}|{{{Offset|}}} days|&amp;amp;mdash;}}&lt;br /&gt;
  }}&lt;br /&gt;
| {{#if:{{#show:{{FULLPAGENAME}}|?Has submission deadline}}&lt;br /&gt;
    |{{#if:{{{Offset|}}}&lt;br /&gt;
      |{{#ifexpr:&lt;br /&gt;
          ( {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 - {{#time:U}} ) / 86400 &amp;lt; 0&lt;br /&gt;
          |past&lt;br /&gt;
          |{{#ifexpr:&lt;br /&gt;
              ( {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 - {{#time:U}} ) / 86400 &amp;lt;= 7&lt;br /&gt;
              |&amp;#039;&amp;#039;&amp;#039;▶ now&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
              |{{#ifexpr:&lt;br /&gt;
                  ( {{#time:U|{{#show:{{FULLPAGENAME}}|?Has submission deadline}}}} + {{{Offset|0}}} * 86400 - {{#time:U}} ) / 86400 &amp;lt;= 21&lt;br /&gt;
                  |soon&lt;br /&gt;
                  |future&lt;br /&gt;
                }}&lt;br /&gt;
            }}&lt;br /&gt;
        }}&lt;br /&gt;
      |&amp;amp;mdash;&lt;br /&gt;
    }}&lt;br /&gt;
    |&amp;amp;mdash;&lt;br /&gt;
  }}&lt;br /&gt;
| {{{When|}}}&lt;br /&gt;
| {{{Action|}}}&lt;br /&gt;
| {{{Audience|}}}&lt;br /&gt;
| {{{Condition|}}}&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>DAharoni</name></author>
	</entry>
</feed>