Commit 0d47f513 authored by Mark Côté's avatar Mark Côté

Don't prepend 'Q' with %q specifier, but keep the 'Q' for default formatting.

parent f4b82f62
...@@ -73,7 +73,7 @@ API.txt for details. ...@@ -73,7 +73,7 @@ API.txt for details.
case 'M': c = leftPad(d.getMinutes()); break; case 'M': c = leftPad(d.getMinutes()); break;
// quarters not in Open Group's strftime specification // quarters not in Open Group's strftime specification
case 'q': case 'q':
c = "Q" + (Math.floor(d.getMonth() / 3) + 1); break; c = "" + (Math.floor(d.getMonth() / 3) + 1); break;
case 'S': c = leftPad(d.getSeconds()); break; case 'S': c = leftPad(d.getSeconds()); break;
case 'y': c = leftPad(d.getFullYear() % 100); break; case 'y': c = leftPad(d.getFullYear() % 100); break;
case 'Y': c = "" + d.getFullYear(); break; case 'Y': c = "" + d.getFullYear(); break;
...@@ -384,9 +384,9 @@ API.txt for details. ...@@ -384,9 +384,9 @@ API.txt for details.
} }
} else if (useQuarters && t < timeUnitSize.year) { } else if (useQuarters && t < timeUnitSize.year) {
if (span < timeUnitSize.year) { if (span < timeUnitSize.year) {
fmt = "%q"; fmt = "Q%q";
} else { } else {
fmt = "%q %Y"; fmt = "Q%q %Y";
} }
} else { } else {
fmt = "%Y"; fmt = "%Y";
......
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