function isMonday($date) {
        return date('w', strtotime($date)) == 1;
}

Usually disclaimer about code typed directly into mail client here.

On 10/02/2010, at 10:27 AM, ctx2002 wrote:

> is there a algorithm which decides a given date is monday?
> 
> for example:
> 
> isMonday('2010-02-10') returns false. but '2010-02-08' returns true.
> 
> -- 
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]

---
Simon Welsh
Admin of http://simon.geek.nz/

Who said Microsoft never created a bug-free program? The blue screen never, 
ever crashes!

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e




-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to