Calendar/Date localization

New: Choose calendar starting day of week
New: Choose prefered date/time formats
New: Option to disable relative dates and show absolute dates instead
This commit is contained in:
Mark McDowall
2014-08-04 22:44:09 -07:00
parent 0ba19f0cd7
commit 18874e2c79
32 changed files with 4049 additions and 1808 deletions
+22
View File
@@ -0,0 +1,22 @@
'use strict';
define(
[
'backbone',
'api!config/ui'
], function (Backbone, uiSettings) {
var UiSettings = Backbone.Model.extend({
url : window.NzbDrone.ApiRoot + '/config/ui',
shortDateTime : function () {
return this.get('shortDateFormat') + ' ' + this.get('timeFormat').replace('(', '').replace(')', '');
},
longDateTime : function () {
return this.get('longDateFormat') + ' ' + this.get('timeFormat').replace('(', '').replace(')', '');
}
});
var instance = new UiSettings(uiSettings);
return instance;
});