How to get the name of the day?
in
Programming Questions
•
8 months ago
I already know that Processing has several functions related to Time and Date.
So for example, if I want to display the date in this format: day-month-year
I can code this way:
This is because day() function only returns an integer value indicating the day number, not the name of the day.
I'm expecting the result like the one below:
Sunday, 10 February 2013
So for example, if I want to display the date in this format: day-month-year
I can code this way:
- text(day() + "-" + month() + "-" + year(), 20, 20);
- switch(month())
- {
- case 1:
- monthName = "January";
- break;
- ...
This is because day() function only returns an integer value indicating the day number, not the name of the day.
I'm expecting the result like the one below:
Sunday, 10 February 2013
1