Re: Question about DayOfWeek
- To: mathgroup at smc.vnet.net
- Subject: [mg126218] Re: Question about DayOfWeek
- From: James Stein <mathgroup at stein.org>
- Date: Wed, 25 Apr 2012 00:37:37 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204240934.FAA24505@smc.vnet.net>
Roughly speaking, "==" only compares things that are comparable. In cases like these, use "===" which demands "sameness" on both sides. I make this mistake often -- not a typo, but a thinko. On Tue, Apr 24, 2012 at 2:34 AM, Kent Holing <KHO at statoil.com> wrote: > DayOfWeek[{1975,1,1}]==Wednesday gives True (as it should), but DayOfWeek[{1975,1,1}]==Thursday gives > Wednesday == Thursday and not False, as it should? Why is it so? >
- References:
- Question about DayOfWeek
- From: Kent Holing <KHO@statoil.com>
- Question about DayOfWeek