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

Commit

Permalink
Merge pull request #7745 from SAPlayer/extman-locale-date
Browse files Browse the repository at this point in the history
Show locale date in Extension Manager
  • Loading branch information
ingorichter committed May 16, 2014
2 parents 368a63c + 248629a commit ba076b2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/extensibility/registry_utils.js
Expand Up @@ -30,7 +30,7 @@
*/

/*jslint vars: true, plusplus: true, nomen: true, indent: 4, maxerr: 50 */
/*global define*/
/*global brackets, define*/

define(function (require, exports, module) {
"use strict";
Expand All @@ -55,11 +55,12 @@ define(function (require, exports, module) {
if (this.versions && this.versions.length) {
result = this.versions[this.versions.length - 1].published;
if (result) {
// Just return the ISO-formatted date, which is the portion up to the "T".
var dateEnd = result.indexOf("T");
if (dateEnd !== -1) {
result = result.substr(0, dateEnd);
}
result = new Date(result);
result = result.toLocaleDateString(brackets.getLocale(), {
"year": "numeric",
"month": "2-digit",
"day": "2-digit"
});
}
}
return result || "";
Expand Down Expand Up @@ -144,4 +145,4 @@ define(function (require, exports, module) {

return sortedEntries;
};
});
});

0 comments on commit ba076b2

Please sign in to comment.