Let max tell if it is weekend?

Thinksamuel's icon

The date object can give me the date and the time but not which day of the week. Is there a way I can know what day of the week it is?
Reason: I track data that are only available during the week, so during the weekend I need to get another datascource.

o s's icon
Max Patch
Copy patch and select New From Clipboard in Max.

if you are on a mac you can use [shell] as a workaround:

hth

hz37's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I thought it was a fun challenge, so here is a Max way of detecting the weekend.

Jan M's icon

other possibilty: the javascript date object can tell you all this.

var d = new Date();
var day = d.getDay();

full reference:
www.w3schools.com/jsref/jsref_obj_date.asp

pdelges's icon

mxj now returns the day of week.

Thinksamuel's icon

Thank you all. I think I will use mxm now, it seems the easiest to do.