var myDate = new Date();
var wochentag = new Array(7);
var myWochentag;
var tomorrow;
function setup() {
createCanvas(400, 400);
wochentag[0] = "Sonntag";
wochentag[1] = "Montag";
wochentag[2] = "Dienstag";
wochentag[3] = "Mittwoch";
wochentag[4] = "Donnerstag";
wochentag[5] = "Freitag";
wochentag[6] = "Sammstag";
myDate.setYear(2017);
myDate.setMonth(11); // 0 - 11
myDate.setDate(31); // 1 - 31 (30,28 ...)
tomorrow = new Date(myDate.getTime() + (24 * 60 * 60 * 1000));
myWochentag = wochentag[myDate.getDay()];
}
function draw() {
background(220);
text(myDate + " = " + myWochentag, 10, 50);
text(tomorrow, 10, 100);
}