if i have a date coming into a function, how can i tell if its a weekend day?
+7
A:
var day = yourDateObject.getDay();
var isWeekend = (day == 6) || (day == 0); // 6 = Saturday, 0 = Sunday
LukeH
2010-08-23 21:25:00
`d` != `day` :) I would rather call it `dayOfWeek`, it would make more sense to OP.
BalusC
2010-08-23 21:26:39