Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit ba076b2

Browse files
committed
Merge pull request #7745 from SAPlayer/extman-locale-date
Show locale date in Extension Manager
2 parents 368a63c + 248629a commit ba076b2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/extensibility/registry_utils.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131

3232
/*jslint vars: true, plusplus: true, nomen: true, indent: 4, maxerr: 50 */
33-
/*global define*/
33+
/*global brackets, define*/
3434

3535
define(function (require, exports, module) {
3636
"use strict";
@@ -55,11 +55,12 @@ define(function (require, exports, module) {
5555
if (this.versions && this.versions.length) {
5656
result = this.versions[this.versions.length - 1].published;
5757
if (result) {
58-
// Just return the ISO-formatted date, which is the portion up to the "T".
59-
var dateEnd = result.indexOf("T");
60-
if (dateEnd !== -1) {
61-
result = result.substr(0, dateEnd);
62-
}
58+
result = new Date(result);
59+
result = result.toLocaleDateString(brackets.getLocale(), {
60+
"year": "numeric",
61+
"month": "2-digit",
62+
"day": "2-digit"
63+
});
6364
}
6465
}
6566
return result || "";
@@ -144,4 +145,4 @@ define(function (require, exports, module) {
144145

145146
return sortedEntries;
146147
};
147-
});
148+
});

0 commit comments

Comments
 (0)