day()

Examples

day() example
void draw() {
  fill(0);
  int w = wday();    // Values from 0 - 6
  char *wdayStr[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
  text(wdayStr[w], 30, 30);
}

Description

The wday() function returns the current day of the week as a value from 0 - 6. If the return value is 0, it's Sunday.

Syntax

wday()

Returns

int

Related

millis()
second()
minute()
hour()
month()
year()

Back to index