MathGroup Archive 2012

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

Search the Archive

Re: Question about DayOfWeek


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?
>



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