Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Home/ask/assignments"

From PCGamingWiki, the wiki about fixing PC games
< Home‎ | ask
m (Undo revision 830871 by Aemony (talk) applied central filtering instead)
Tag: Undo
(changed lookups to use the #time parser function to automatically perform the necessary date calculates from the time the page was refreshed)
Line 3: Line 3:
 
     <div class="month-container">
 
     <div class="month-container">
 
         <div class="month">
 
         <div class="month">
             <p>'''September'''</p>
+
             <p>'''Current month: {{#time: F | now }}'''</p>
 
         </div>
 
         </div>
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
Line 9: Line 9:
 
             tables=Assignments
 
             tables=Assignments
 
             |fields=Game,Status,Release_Date
 
             |fields=Game,Status,Release_Date
             |where=DATEDIFF(Release_Date, '2019-09-01') >= 0 AND DATEDIFF(Release_Date, '2019-10-01') < 0
+
             |where=DATEDIFF(Release_Date, '{{#time: Y-m-01 | now }}') >= 0 AND DATEDIFF(Release_Date, '{{#time: Y-m-01 | now +1 months }}') < 0
 
             |format=template
 
             |format=template
 
             |template=:Home/ask/assignments/row
 
             |template=:Home/ask/assignments/row
             |order by=Release_Date DESC
+
             |order by=Release_Date ASC
 
             |more results text=
 
             |more results text=
 
             }}
 
             }}
 
         </table>
 
         </table>
 
     </div>
 
     </div>
 +
 +
----
  
 
     <div class="month-container">
 
     <div class="month-container">
 
         <div class="month">
 
         <div class="month">
             <p>'''August'''</p>
+
             <p>'''Next month: {{#time: F | now +1 months }}'''</p>
 
         </div>
 
         </div>
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
Line 26: Line 28:
 
             tables=Assignments
 
             tables=Assignments
 
             |fields=Game,Status,Release_Date
 
             |fields=Game,Status,Release_Date
             |where=DATEDIFF(Release_Date, '2019-08-01') >= 0 AND DATEDIFF(Release_Date, '2019-09-01') < 0
+
             |where=DATEDIFF(Release_Date, '{{#time: Y-m-01 | now +1 months }}') >= 0 AND DATEDIFF(Release_Date, '{{#time: Y-m-01 | now +2 months }}') < 0
 
             |format=template
 
             |format=template
 
             |template=:Home/ask/assignments/row
 
             |template=:Home/ask/assignments/row
             |order by=Release_Date DESC
+
             |order by=Release_Date ASC
 
             |more results text=
 
             |more results text=
 
             }}
 
             }}
 
         </table>
 
         </table>
 
     </div>
 
     </div>
 +
 +
----
  
 
     <div class="month-container">
 
     <div class="month-container">
 
         <div class="month">
 
         <div class="month">
             <p>'''July'''</p>
+
             <p>'''Previous month: {{#time: F | now -1 months }}'''</p>
 
         </div>
 
         </div>
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
 
         <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;">
Line 43: Line 47:
 
             tables=Assignments
 
             tables=Assignments
 
             |fields=Game,Status,Release_Date
 
             |fields=Game,Status,Release_Date
             |where=DATEDIFF(Release_Date, '2019-07-01') >= 0 AND DATEDIFF(Release_Date, '2019-08-01') < 0
+
             |where=DATEDIFF(Release_Date, '{{#time: Y-m-01 | now -1 months }}') >= 0 AND DATEDIFF(Release_Date, '{{#time: Y-m-01 | now }}') < 0
 
             |format=template
 
             |format=template
 
             |template=:Home/ask/assignments/row
 
             |template=:Home/ask/assignments/row
Line 51: Line 55:
 
         </table>
 
         </table>
 
     </div>
 
     </div>
 
  
 
</div><noinclude>{{Documentation}}</noinclude>
 
</div><noinclude>{{Documentation}}</noinclude>

Revision as of 06:45, 1 September 2019

Current month: April

28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]

Next month: May

28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]

Previous month: March

28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
28 [[]]
Documentation for the above template (sometimes hidden from view).

Description

Purge the home page to refresh the lists.

This page makes use of the #cargo_query function along with relevant #time parser function to query data from the Assignments Cargo table (populated by the the Assignments/Table page) which is then transcluded unto Home. As part of the database query, the query makes use of the DATEDIFF() function to validate if the specified Release Date (also set on the the Assignments/Table page) is between two dates, the first day of the month or the first day of the next month.

The two future months listed first are ordered by the release date in ascending order. The bottom past month is ordered in descending order.