X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/JSON.html?ds=inline diff --git a/docs/source/JSON.html b/docs/source/JSON.html index 471eff5b..5a1ecb13 100644 --- a/docs/source/JSON.html +++ b/docs/source/JSON.html @@ -118,6 +118,18 @@ Ext.util.JSON = new (function(){ return a.join(""); }; +
/** + *Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression. + * The returned value includes enclosing double quotation marks.
+ *The default return format is "yyyy-mm-ddThh:mm:ss".
+ *To override this:
+Ext.util.JSON.encodeDate = function(d) {
+ return d.format('"Y-m-d"');
+};
+
+ * @param {Date} d The Date to encode
+ * @return {String} The string literal to use in a JSON string.
+ */
this.encodeDate = function(o){
return '"' + o.getFullYear() + "-" +
pad(o.getMonth() + 1) + "-" +