Difference between revisions of "Template:StaticMeetingCountdown"

From Free Software Directory
Jump to: navigation, search
(+argument inheritance from Template:IRC_text)
m (-&mdash glitch in branch 2)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
+
{{#ifexpr:{{Template:StaticMeetingCountdown/isMeetingDay|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}}
Static countdown for weekly meetings.<br>
+
|&mdash;&mdash;&nbsp;{{#ifexpr:{{Template:StaticMeetingCountdown/meetingRemDays|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}} <= 2|meeting is tomorrow|{{Template:StaticMeetingCountdown/meetingRemDays|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}} days until next meeting}}
It is updated on page refresh and shows the number of remaining days until the next meeting, including the ongoing day.<br>
+
|{{#ifexpr:{{Template:StaticMeetingCountdown/meetingPastHour|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}} > 0||&mdash;&mdash;&nbsp;today's meeting ended}}
Without parameters (and here), the template shows an example countdown. The accuracy of the calculations depends on the local instance of MediaWiki and from network caching.<br>
 
Instructions for the subtemplates ("parameter=default:type := definition"):
 
<ul>
 
<li><b>day_name</b>=<i>Friday:string</i>    := day of the week in extended format. Case-sensitive: always start with a capital letter;</li>
 
<li><b>start_hour_time</b>=<i>12:integer</i> := hour of the day. Use UTC;</li>
 
<li><b>corr_hours</b>=<i>5:integer</i> := server time zone compensation in hours.</li>
 
</ul>
 
Contact me in case of technical issues. --[[User:LorenzoAncora|LorenzoAncora]] ([[User talk:LorenzoAncora|talk]])
 
<hr>
 
</noinclude>{{#ifexpr:{{/isMeetingDay|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}}
 
|&mdash;&mdash;&nbsp;{{#ifeq:{{/meetingRemDays|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}}|2|meeting is tomorrow|{{/meetingRemDays|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}} days until next meeting}}
 
|{{#ifexpr:{{/meetingPastHour|day_name={{{day_name|Friday}}}|start_hour_time={{{start_hour_time|12}}}}} > 0||today's meeting ended}}
 
 
}}
 
}}

Latest revision as of 07:57, 1 May 2020



Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the page “GNU Free Documentation License”.

The copyright and license notices on this page only apply to the text on this page. Any software or copyright-licenses or other similar notices described in this text has its own copyright notice and license, which can usually be found in the distribution or license text itself.