MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Freifunk Köln, Bonn und Umgebung
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 18: Zeile 18:
     var ret = "";
     var ret = "";
     var today = new Date();
     var today = new Date();
    for (var counter = 0;counter < 3; counter++){
        var text = null;
        while (!(text = getDateText(today, bonnText, koelnText))) { // Count
            today.setDate(today.getDate() + 1);
        }
        today.setDate(today.getDate() + 1);
        ret += text;
    }
    return ret;
};
};

Version vom 22. Oktober 2019, 09:46 Uhr

const DATE_CONFIG = [
    {
        week: 1, // 1st week
        day: 4, // Thursday
        text: 'in der <a rel="nofollow" class="external text" href="https://www.openstreetmap.org/way/123890490">Alten VHS, Wilhelmstraße 34</a>, <b>20:00</b> Uhr'
    }, {
        week: 2, //2nd week
        day: 4, // Thursday
        text: 'im <a rel="nofollow" class="external text" href="https://koeln.ccc.de">C4</a> in Köln, <a rel="nofollow" class="external text" href="http://www.koeln.ccc.de/c4/faq/index.xml#anreise">Helios Str. 6a</a>, <b>20:00</b> Uhr'
    }, {
        week: 3, // 3rd week
        day: 4, // Thursday
        text: 'in der <a rel="nofollow" class="external text" href="https://www.openstreetmap.org/way/123890490">Alten VHS, Wilhelmstraße 34</a>, <b>20:00</b> Uhr'
    }
];

const upcomingDates = function(){
    var ret = "";
    var today = new Date();
    for (var counter = 0;counter < 3; counter++){
        var text = null;
        while (!(text = getDateText(today, bonnText, koelnText))) { // Count
            today.setDate(today.getDate() + 1);
        }
        today.setDate(today.getDate() + 1);
        ret += text;
    }
    return ret;
};