Hi,

Please provide a working playground example, so that we can have a look on it.

Tino


Am 05.09.2011 um 14:15 schrieb smisobnline:

Hello,

i create my own class , based upon the date classf rom qooxdoo. i only
change the  format of teh given date to  transfer mysql ateformat. See
code below


some date strings i give

2002-12-31
2000-01-01

result in wrong  values. Sometimes it gives a year more back and
sometimes a year less

2000-01-01 = 1.1.1999
2002-12-31 = 31.1.2003

is this a  bug inside the date format clas from qooxdoo?

What can i be?






qx.Class.define("makebiz.system.ui.table.cellrenderer.Date", {
    extend : qx.ui.table.cellrenderer.Date,
      members : {
        _getContentHtml : function(cellInfo){
              var df = this.getDateFormat();
              if (df){
                if (cellInfo.value) {
                    if(cellInfo.value.length == 10) {
                        var el,el1,el2 = [];
                        el = cellInfo.value.split(" ");
                        var el1 = el[0].split("-");
                        var datum = new
Date(el1[0],(el1[1]-1),el1[2],0,0,0);
                        cellInfo.value = datum;
                        }
                    else if(cellInfo.value.length == 19) {
                        var el,el1,el2 = [];
                        el = cellInfo.value.split(" ");
                        var el1 = el[0].split("-");
                        var el2 = el[1].split(":");
                        var datum = new
Date(el1[0],(el1[1]-1),el1[2],el2[0],el2[1],el2[2]);
                        cellInfo.value = datum;
                        }
                    else {
                        return "";
                        }

//alert(cellInfo.value + " -> " + df.format(cellInfo.value));
                      return
qx.bom.String.escape(df.format(cellInfo.value));
                } else {
                      return "";
                    }
                  }
              else{
                return cellInfo.value || "";
                  }
            }
          }
      });

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Tino Butz
Mobile Architect

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-4488
tino.b...@1und1.de<mailto:tino.b...@1und1.de>

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Robert Hoffmann, 
Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to