P5js-calendar-weekday
From Digipool-Wiki
Revision as of 12:53, 9 March 2018 by WikiSysop (Talk | contribs) (Created page with " <pre> var myDate = new Date(); var wochentag = new Array(7); var myWochentag; function setup() { createCanvas(400, 400); wochentag[0] = "Sonntag"; wochentag[1] = "Mo...")
var myDate = new Date(); var wochentag = new Array(7); var myWochentag; 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(30); // 0 - 30 myWochentag = wochentag[myDate.getDay()]; } function draw() { background(220); text(myDate + " = " + myWochentag, 10, 50); }