Vorlage:5Höcker2Date: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Datumskonverter) |
|||
Zeile 1: | Zeile 1: | ||
− | {{#vardefine:DAT|{{{1| | + | {{#vardefine:DAT|{{{1|27.Mai.2008}}}}}<!-- |
-->{{#vardefine:DAT|{{#replace:{{#var:DAT}}|ai|ay}}}}<!-- | -->{{#vardefine:DAT|{{#replace:{{#var:DAT}}|ai|ay}}}}<!-- | ||
-->{{#vardefine:DAT|{{#replace:{{#var:DAT}}|ez|ec}}}}<!-- | -->{{#vardefine:DAT|{{#replace:{{#var:DAT}}|ez|ec}}}}<!-- | ||
Zeile 9: | Zeile 9: | ||
|{{#if:{{#ifexpr:{{#explode:{{#var:DAT}}|,|1}} }}|{{#explode:{{#var:DAT}}|,|1}}|{{#var:DAT}}}} | |{{#if:{{#ifexpr:{{#explode:{{#var:DAT}}|,|1}} }}|{{#explode:{{#var:DAT}}|,|1}}|{{#var:DAT}}}} | ||
|{{#explode:{{#var:DAT}}|.|2}}-{{#explode:{{#var:DAT}}|.|1}}-{{#explode:{{#var:DAT}}|.|0}} | |{{#explode:{{#var:DAT}}|.|2}}-{{#explode:{{#var:DAT}}|.|1}}-{{#explode:{{#var:DAT}}|.|0}} | ||
− | }}}}{{#switch:{{{2| | + | }}}}{{#switch:{{{2|5}}}<!---- Die +6h: Das datum hat irgendwie 2h verspätung!---> |
|1={{#time:j. M Y|{{#var:DAT}} +6 hours}} | |1={{#time:j. M Y|{{#var:DAT}} +6 hours}} | ||
|2={{#time:Y-m-d |{{#var:DAT}} +6 hours}} | |2={{#time:Y-m-d |{{#var:DAT}} +6 hours}} | ||
|3={{#time:d. n. Y |{{#var:DAT}} +6 hours}} | |3={{#time:d. n. Y |{{#var:DAT}} +6 hours}} | ||
+ | |4={{#time:d. n. Y |{{#var:DAT}} +30 days +6 hours}} | ||
+ | |5={{#expr:({{#time:U|{{#var:DAT}} +30 days}}-{{#time:U|{{#time:Y-m-d}}}})/86400 round 0}} | ||
}}<noinclude> | }}<noinclude> | ||
----- | ----- | ||
Zeile 26: | Zeile 28: | ||
*switch=2: yyyy-mm-dd (2008-01-06) | *switch=2: yyyy-mm-dd (2008-01-06) | ||
*switch=3: dd.m.yyyy (06. 6. 2008) | *switch=3: dd.m.yyyy (06. 6. 2008) | ||
+ | *switch=4: dd.m.yyyy (06. 6. 2008) + 30 Tage | ||
+ | *switch=5: dd Differenz (06. 6. 2008) + 30 Tage zu Heute | ||
+ | |||
[[Kategorie:Spezial-Vorlagen]] | [[Kategorie:Spezial-Vorlagen]] | ||
[[Kategorie:Vorlage]] | [[Kategorie:Vorlage]] | ||
</noinclude> | </noinclude> |
Version vom 26. Juni 2008, 04:09 Uhr
-5989
Aufruf: {{5Höcker2Date|Datum|Ausgabeformatswitch}}
Zusatzinfo: Mögliche Eingabeformate (mit oder ohne Space oder 0):
- ~~~~
- ~~~~~
- d. Mon. yyyy (6. Jan. 2008)
- d. m. yyyy (6. 1. 2008)
Ausgabe:
- switch=1: d. Mon. yyyy (6. Jan. 2008)
- switch=2: yyyy-mm-dd (2008-01-06)
- switch=3: dd.m.yyyy (06. 6. 2008)
- switch=4: dd.m.yyyy (06. 6. 2008) + 30 Tage
- switch=5: dd Differenz (06. 6. 2008) + 30 Tage zu Heute