MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question about DayOfWeek


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



  • Prev by Date: Re: Question about DayOfWeek
  • Next by Date: Coloured strings
  • Previous by thread: Re: Question about DayOfWeek
  • Next by thread: Re: Question about DayOfWeek