I've seen the answer to this question but, if I apply it to my code, I get the following error:
Warning: date() expects parameter 2 to be long, object given
This is my code:
while (date('N', $EndDate2)>=6){
...do stuff..;
}
Note: $EndDate2 is an object date