Commit 678ff275 authored by Nick Schonning's avatar Nick Schonning

Enforce indenting with JSHint

- Doesn't differentiate between tabs and spaces
- Switch/Case indenting may seem odd to some
parent d76e1cb2
......@@ -19,5 +19,6 @@
},
"browser": true,
"jquery": true
"jquery": true,
"indent": 4
}
......@@ -69,25 +69,56 @@ API.txt for details.
if (escape) {
switch (c) {
case "a": c = "" + dayNames[d.getDay()]; break;
case "b": c = "" + monthNames[d.getMonth()]; break;
case "d": c = leftPad(d.getDate()); break;
case "e": c = leftPad(d.getDate(), " "); break;
case "a":
c = "" + dayNames[d.getDay()];
break;
case "b":
c = "" + monthNames[d.getMonth()];
break;
case "d":
c = leftPad(d.getDate());
break;
case "e":
c = leftPad(d.getDate(), " ");
break;
case "h": // For back-compat with 0.7; remove in 1.0
case "H": c = leftPad(hours); break;
case "I": c = leftPad(hours12); break;
case "l": c = leftPad(hours12, " "); break;
case "m": c = leftPad(d.getMonth() + 1); break;
case "M": c = leftPad(d.getMinutes()); break;
case "H":
c = leftPad(hours);
break;
case "I":
c = leftPad(hours12);
break;
case "l":
c = leftPad(hours12, " ");
break;
case "m":
c = leftPad(d.getMonth() + 1);
break;
case "M":
c = leftPad(d.getMinutes());
break;
// quarters not in Open Group's strftime specification
case "q":
c = "" + (Math.floor(d.getMonth() / 3) + 1); break;
case "S": c = leftPad(d.getSeconds()); break;
case "y": c = leftPad(d.getFullYear() % 100); break;
case "Y": c = "" + d.getFullYear(); break;
case "p": c = (isAM) ? ("" + "am") : ("" + "pm"); break;
case "P": c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
case "w": c = "" + d.getDay(); break;
c = "" + (Math.floor(d.getMonth() / 3) + 1);
break;
case "S":
c = leftPad(d.getSeconds());
break;
case "y":
c = leftPad(d.getFullYear() % 100);
break;
case "Y":
c = "" + d.getFullYear();
break;
case "p":
c = (isAM) ? ("" + "am") : ("" + "pm");
break;
case "P":
c = (isAM) ? ("" + "AM") : ("" + "PM");
break;
case "w":
c = "" + d.getDay();
break;
}
r.push(c);
escape = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment