Aus Kitakien
(Unterschied zwischen Versionen)
|
|
Zeile 9: |
Zeile 9: |
| | | |
| [[Kategorie:Wikipedia:Datumsberechnung|WochentagName]] | | [[Kategorie:Wikipedia:Datumsberechnung|WochentagName]] |
- | </noinclude><!-- | + | </noinclude><includeonly><!-- |
| | | |
| Parameter: {{{1}}} Tag; {{{2}}} Monat; {{{3}}} Jahr. | | Parameter: {{{1}}} Tag; {{{2}}} Monat; {{{3}}} Jahr. |
| | | |
- | -->{{#switch: | + | -->{{#time:l|{{{3|{{LOCALYEAR}}}}}{{padleft:{{{2|{{LOCALMONTH}}}}}|2|0}}{{padleft:{{{1|{{LOCALDAY}}}}}|2|0}}000000}}</includeonly> |
- | | + | |
- | {{#expr: ( {{#switch:{{CURRENTMONTH}} <!--Berechnung der Differenz von heutigem Datum und gefragtem Datum in Tagen-->
| + | |
- | |01 = 0
| + | |
- | |02 = 31 <!--Tage bis 1. Februar-->
| + | |
- | |03 = 59 <!--Tage bis 1. März-->
| + | |
- | |04 = 90 <!--usw.-->
| + | |
- | |05 = 120
| + | |
- | |06 = 151
| + | |
- | |07 = 181
| + | |
- | |08 = 212
| + | |
- | |09 = 243
| + | |
- | |10 = 273
| + | |
- | |11 = 304
| + | |
- | |12 = 334
| + | |
- | }}
| + | |
- | + {{CURRENTDAY}}
| + | |
- | + {{CURRENTYEAR}} - {{{3}}}
| + | |
- | + ({{CURRENTYEAR}}-{{CURRENTYEAR}}mod4-{{{3}}}+{{{3}}}mod4)/4 <!--Hinzufügen von Schalttagen-->
| + | |
- | - ({{CURRENTYEAR}}-{{CURRENTYEAR}}mod100-{{{3}}}+{{{3}}}mod100)/100
| + | |
- | + ({{CURRENTYEAR}}-{{CURRENTYEAR}}mod400-{{{3}}}+{{{3}}}mod400)/400
| + | |
- | + {{#ifexpr: {{{3}}}mod4=0 and {{{2}}}<=2 |1 |0 }} <!--Korrektur (evtl. ist ein Schalttag zu viel berechnet worden)-->
| + | |
- | - {{#ifexpr: {{{3}}}mod100=0 and {{{2}}}<=2 |1 |0 }}
| + | |
- | + {{#ifexpr: {{{3}}}mod400=0 and {{{2}}}<=2 |1 |0 }}
| + | |
- | + 364 - {{#switch: {{{2}}}
| + | |
- | |01 = 0
| + | |
- | |02 = 31 <!--Tage bis 1. Februar-->
| + | |
- | |03 = 59 <!--Tage bis 1. März-->
| + | |
- | |04 = 90 <!--usw.-->
| + | |
- | |05 = 120
| + | |
- | |06 = 151
| + | |
- | |07 = 181
| + | |
- | |08 = 212
| + | |
- | |09 = 243
| + | |
- | |10 = 273
| + | |
- | |11 = 304
| + | |
- | |12 = 334
| + | |
- | }}
| + | |
- | - {{{1}}}) mod 7 }} <!--Differenz Rest 7 ergibt den Wochentag-->
| + | |
- | | + | |
- | |0 = {{#switch: {{CURRENTDOW}}
| + | |
- | |0 = Sonntag
| + | |
- | |1 = Montag
| + | |
- | |2 = Dienstag
| + | |
- | |3 = Mittwoch
| + | |
- | |4 = Donnerstag
| + | |
- | |5 = Freitag
| + | |
- | |6 = Samstag
| + | |
- | }}
| + | |
- | |1 = {{#switch: {{CURRENTDOW}}
| + | |
- | |1 = Sonntag
| + | |
- | |2 = Montag
| + | |
- | |3 = Dienstag
| + | |
- | |4 = Mittwoch
| + | |
- | |5 = Donnerstag
| + | |
- | |6 = Freitag
| + | |
- | |0 = Samstag
| + | |
- | }}
| + | |
- | |2 = {{#switch: {{CURRENTDOW}}
| + | |
- | |2 = Sonntag
| + | |
- | |3 = Montag
| + | |
- | |4 = Dienstag
| + | |
- | |5 = Mittwoch
| + | |
- | |6 = Donnerstag
| + | |
- | |0 = Freitag
| + | |
- | |1 = Samstag
| + | |
- | }}
| + | |
- | |3 = {{#switch: {{CURRENTDOW}}
| + | |
- | |3 = Sonntag
| + | |
- | |4 = Montag
| + | |
- | |5 = Dienstag
| + | |
- | |6 = Mittwoch
| + | |
- | |0 = Donnerstag
| + | |
- | |1 = Freitag
| + | |
- | |2 = Samstag
| + | |
- | }}
| + | |
- | |4 = {{#switch: {{CURRENTDOW}}
| + | |
- | |4 = Sonntag
| + | |
- | |5 = Montag
| + | |
- | |6 = Dienstag
| + | |
- | |0 = Mittwoch
| + | |
- | |1 = Donnerstag
| + | |
- | |2 = Freitag
| + | |
- | |3 = Samstag
| + | |
- | }}
| + | |
- | |5 = {{#switch: {{CURRENTDOW}}
| + | |
- | |5 = Sonntag
| + | |
- | |6 = Montag
| + | |
- | |0 = Dienstag
| + | |
- | |1 = Mittwoch
| + | |
- | |2 = Donnerstag
| + | |
- | |3 = Freitag
| + | |
- | |4 = Samstag
| + | |
- | }}
| + | |
- | |6 = {{#switch: {{CURRENTDOW}}
| + | |
- | |6 = Sonntag
| + | |
- | |0 = Montag
| + | |
- | |1 = Dienstag
| + | |
- | |2 = Mittwoch
| + | |
- | |3 = Donnerstag
| + | |
- | |4 = Freitag
| + | |
- | |5 = Samstag
| + | |
- | }}
| + | |
- | }} | + | |
Version vom 11:51, 27. Aug. 2006
Eingabe:
{{WochentagName|1|1|1970}}
(Tag|Monat|Jahr)
Ausgabe:
Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag, Sonntag