Okay, I just read that method toString() on a Date object is by 
specification returning an implementation-dependent string; although 
toUTCString() method is implementation-dependent too, it appears better 
suited to create a parseable date string if I were to follow Ilkka's 
approach.
So I hope you excuse my browser related ranting...

Greetings,
Stefan

On 10.02.2010 02:00, Stefan Volbers wrote:
> Hi Ilkka,
>
> bad news from the browser front:
> Your proposed solution fails because the exported time string format
> differs between browsers.
> In every decent browser I tested (english or german versions) I have a
> date string like "Wed Feb 10 2010 00:00:00 bla", while only in IE7 and
> IE8 (german) I have "Wed Feb 10 00:00:00 bla 2010".
> Test yourself, type this in your fav browser's URL input (and then in
> your customers' company dictated browser-look-a-like):
>
> javascript:var j = new Date(); alert(j.toString());
>
> Although this makes parts of my body hurt, it appeared to be not such a
> problem, as dealing with a native Date object would be more elegant:
>
> var da = myDateField.getValue();
> da.getFullYear() + ((da.getMonth() + 1).toString().length == 1 ? "0" :
> "") + (da.getMonth() + 1).toString() + (da.getDate().toString().length
> == 1 ? "0" : "") + da.getDate();
>
> Although your using a regexp is cooler;-)
>
> That said, after I read DateField.js, I found
> this.getChildControl("textfield").getValue()
> seems to return exactly what I need.
>
> Still, if some qooxdoo gooroo(TM) knows another, official way, or anyone
> just wanna approve the solution above, I'd be curious to listen.

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to