[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)? code 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?! /code Umm… If something is both = *and* = the only possibly is that it is equal. So… WTF? dave myron principal, technical director contentfree ⊡ 206.855.5580 phone | 206.774.2767 fax ⊠ [EMAIL PROTECTED] ⊟ 337 1st ave ne. suite 100, issaquah, wa 98027 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Can't believe this bug hasn't been mentioned before - DateTime parsing in Web Services is BORKED
I can't believe this hasn't been fixed yet because it appears that it should've been a problem from v5 or v6 and beyond. The decoding code for DateTimes in web service PendingCalls has a bug and does not correctly parse valid datetimes. The simplest way to recreate this bug is to access a web service that returns a dateTime in the format 2000-01-12T12:13:14Z. Crazy that this bug exists, because the W3C's **example** is in that format (see http://www.w3.org/TR/xmlschema-2/#isoformats). Notice there's no millisecond. The bug itself exists in mx.services.PendingCall.decodeDate() where it *assumes* there's milliseconds. The only way to work around it is to have your web service put out a *string* that's in datetime format and have Flash parse the string (or use the datatype of 'date' instead of 'dateTime' if the time isn't important for your usage). That workaround is a hassle because then you have to write parsing code - bleh. Has anybody seen this before and do they have a better workaround than parsing a string representation of the date time (granted that's exactly what PendingCall does - just not very well)? dave myron principal, technical director contentfree ⊡ 206.855.5580 phone | 206.774.2767 fax ⊠ [EMAIL PROTECTED] ⊟ 337 1st ave ne. suite 100, issaquah, wa 98027 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com