H 15 24-hour format of an hour with leading zeros
i 05 Minutes with leading zeros
s 01 Seconds, with leading zeros
- O -0600 Difference to Greenwich time (GMT) in hours
- o -06 Difference to Greenwich time (GMT) in hours without minutes.. (postgresql outputs this.)
+ O -0600 Difference to Greenwich time (GMT) in hours (Allows +08, without minutes)
P -06:00 Difference to Greenwich time (GMT) with colon between hours and minutes
T CST Timezone setting of the machine running the code
Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east)
/**
* @private
*/
+
Date.createParser = function(format) {
var funcName = "parse" + Date.parseFunctions.count++;
var regexNum = Date.parseRegexes.length;
+ "y = d.getFullYear();\n"
+ "m = d.getMonth();\n"
+ "d = d.getDate();\n"
+ + "if (typeof(input) !== 'string') { input = input.toString(); }\n"
+ "var results = input.match(Date.parseRegexes[" + regexNum + "]);\n"
+ "if (results && results.length > 0) {";
var regex = "";
};
// private
-// safari setMonth is broken
-if(Roo.isSafari){
+// safari setMonth is broken -- check that this is only donw once...
+if(Roo.isSafari && typeof(Date.brokenSetMonth) == 'undefined'){
Date.brokenSetMonth = Date.prototype.setMonth;
Date.prototype.setMonth = function(num){
if(num <= -1){
*/
Date.prototype.add = function(interval, value){
var d = this.clone();
- if (!interval || value === 0) return d;
+ if (!interval || value === 0) { return d; }
switch(interval.toLowerCase()){
case Date.MILLI:
d.setMilliseconds(this.getMilliseconds() + value);