Re: Question about DayOfWeek
- To: mathgroup at smc.vnet.net
- Subject: [mg126205] Re: Question about DayOfWeek
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Wed, 25 Apr 2012 00:33:07 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201204240934.FAA24505@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
Use === (SameQ) rather than == (Equal). To Equal, it is possible that Wednesday and Thursday are symbols with equal value. Clear[x, y] x == y x == y (* returns unevaluated, since x and y may or may not be equal *) x === y False (* different expressions are not the same *) Bobby On Tue, 24 Apr 2012 04:34:58 -0500, 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? > -- DrMajorBob at yahoo.com
- References:
- Question about DayOfWeek
- From: Kent Holing <KHO@statoil.com>
- Question about DayOfWeek