Re: [Flashcoders] Simple date comparison bug?

2006-03-23 Thread Johannes Nel
you are comparing objects, so you are asking in the firstone are these two references the same no they are not. its two different objects the you are asking is this reference smaller than equal to that refrence, flash then goes huh wtf a refrence that you are doing <= on this object, ok lets conver

[Flashcoders] Simple date comparison bug?

2006-03-23 Thread Dave Myron
Don't know why I haven't come across this before, but can anyone confirm this for me (and maybe give an explanation)? var d1:Date = new Date( 1970, 0 ); var d2:Date = new Date( 1970, 0 ); trace( d1 == d2 ); // false trace( d1 <= d2 ); // true trace( d1 >= d2 ); // TRUE?! Umm… If something is b

RE: [Flashcoders] Simple date comparison bug?

2006-03-23 Thread Scott Hyndman
Good to know. Thanks Francis. Scott -Original Message- From: [EMAIL PROTECTED] on behalf of Francis Cheng Sent: Thu 3/23/2006 7:27 PM To: Flashcoders mailing list Cc: Subject:RE: [Flashcoders] Simple date comparison bug? This is due to the ECMAScript algorithm for

RE: [Flashcoders] Simple date comparison bug?

2006-03-23 Thread Francis Cheng
g list' > Subject: [Flashcoders] Simple date comparison bug? > > Don't know why I haven't come across this before, but can anyone confirm > this for me (and maybe give an explanation)? > > > var d1:Date = new Date( 1970, 0 ); > var d2:Date = new Date( 1970, 0 );

Re: [Flashcoders] Simple date comparison bug?

2006-03-23 Thread Grant Cox
Well, it depends how the comparisons work. When you check equivalence "==" it is checking whether the two Date instances are the same object, which of course they aren't. When you check greater than or less than, it can only check their value, and that is the same. So it comes down to how the

Re: [Flashcoders] Simple date comparison bug?

2006-03-23 Thread Ryan Matsikas
var d1:Date = new Date( 1970, 0 ); var d2:Date = new Date( 1970, 0 ); trace( d1.toString() == d2.toString() ); // true trace( d1 = d2 ); // Thu Jan 1 00:00:00 GMT-0700 1970 On 3/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Don't know why I haven't come across this before, but can anyone

[Flashcoders] Simple date comparison bug?

2006-03-23 Thread lists
Don't know why I haven't come across this before, but can anyone confirm this for me (and maybe give an explanation)? var d1:Date = new Date( 1970, 0 ); var d2:Date = new Date( 1970, 0 ); trace( d1 == d2 ); // false trace( d1 <= d2 ); // true trace( d1 >= d2 ); // TRUE?! Umm… If something is b