On 12/13/2011 04:33 AM, Simon White wrote:
> Hi
>
> The conversion had two phases because dates in my database are stored in
> yyyyMMdd format:
>
> 1) I convert the "20110614" string to a date with a converter
> 2) Then I set the date format of the widget to "EEE MMM dd, yyyy"
>
> The problem I had was that a javascript date object returns months from
> 0 - 11 so I assumed that QooxDoo was doing the same thing and
> compensated for that assumption in my converter.

You could use qx.util.format.DateFormat.parse for that.

> I have since discovered that the date string as you mentioned does not
> assume the months start with 00.  So now I only have to compensate when
> I convert a date back to a date string since date.getMonth() starts at 00.

Again, DateFormat.format can do that for you.

T.


------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to