Difference between revisions of "Template:Weekdays in month"

From Geohashing
imported>Tjtrumpet2323
 
imported>Tjtrumpet2323
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr: {{#expr: 29 + ( 7 + {{{3}}} - {{weekday|{{{1}}}|{{{2}}}|1}} ) mod 7 }} > {{Days in month|{{{1}}}|{{{2}}}}}|4|5}}</includeonly><noinclude>
+
<includeonly>{{#ifexpr: {{#expr: 29 + ( 7 + {{{3}}} - {{#expr: {{WEEKDAY |{{{1}}}|{{{2}}}|1}} + 1 mod 7}} ) mod 7 }} > {{#time:t|{{{1}}}-{{{2}}}-01}} | 4 | 5}}</includeonly><noinclude>
<nowiki>{{Weekdays in month|Y|M|D}}</nowiki> returns how many days D (0=Sunday, ... 6=Saturday) there are in month M of year Y.
+
<nowiki>{{Weekdays in month|Y|M|N}}</nowiki> returns how many days N (0=Sunday, ... 6=Saturday) there are in month M of year Y.
  
 +
{{Calendar/Month}}
 
This month has the following counts for the different days:
 
This month has the following counts for the different days:
 
*Mondays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|1}}
 
*Mondays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|1}}
Line 10: Line 11:
 
*Saturdays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|6}}
 
*Saturdays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|6}}
 
*Sundays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|0}}
 
*Sundays: {{Weekdays_in_month|{{CURRENTYEAR}}|{{CURRENTMONTH}}|0}}
{{CURRENTCALENDAR}}
 
 
   
 
   
 
== See also ==
 
== See also ==
 
* [[wikipedia:Template:Weekdays in month|This template on Wikipedia]]
 
* [[wikipedia:Template:Weekdays in month|This template on Wikipedia]]
 
</noinclude>
 
</noinclude>

Latest revision as of 20:13, 6 June 2008

{{Weekdays in month|Y|M|N}} returns how many days N (0=Sunday, ... 6=Saturday) there are in month M of year Y.


« November 2024 »
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

This month has the following counts for the different days:

  • Mondays: 4
  • Tuesdays: 4
  • Wednesdays: 4
  • Thursdays: 4
  • Fridays: 5
  • Saturdays: 5
  • Sundays: 4

See also