Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 2651843003: DevTools: update console timestamp style (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/platform/utilities.js
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
index 2b5b514d972c5f9821e38ec8082e5f3ad9cfc2a8..e89aec23ce9c92c28bbf433ff84278e91ef122c1 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -405,7 +405,7 @@ Date.prototype.toISO8601Compact = function() {
};
/**
- * @return {string}
+ * @return {!Object<string, string>}
*/
Date.prototype.toConsoleTime = function() {
chenwilliam 2017/01/24 03:32:13 I would just remove this method and create a utili
luoe 2017/01/24 23:16:19 No other need right now. Moved inline into Consol
/**
@@ -424,9 +424,10 @@ Date.prototype.toConsoleTime = function() {
return '0'.repeat(3 - x.toString().length) + x;
}
- return this.getFullYear() + '-' + leadZero2(this.getMonth() + 1) + '-' + leadZero2(this.getDate()) + ' ' +
- leadZero2(this.getHours()) + ':' + leadZero2(this.getMinutes()) + ':' + leadZero2(this.getSeconds()) + '.' +
- leadZero3(this.getMilliseconds());
+ var yearMonthDay = this.getFullYear() + '-' + leadZero2(this.getMonth() + 1) + '-' + leadZero2(this.getDate());
+ var hourMinuteSecond = leadZero2(this.getHours()) + ':' + leadZero2(this.getMinutes()) + ':' +
+ leadZero2(this.getSeconds()) + '.' + leadZero3(this.getMilliseconds());
+ return {yearMonthDay: yearMonthDay, hourMinuteSecond: hourMinuteSecond};
};
Object.defineProperty(Array.prototype, 'remove', {

Powered by Google App Engine
This is Rietveld 408576698