diff --git a/core/config.js b/core/config.js index 49ff5b0d..1d7d4b69 100644 --- a/core/config.js +++ b/core/config.js @@ -88,6 +88,9 @@ function getDefaultConfig() { }, timeFormat : { short : 'h:mm a', + }, + dateTimeFormat : { + short : 'MM/DD/YYYY h:mm a', } }, diff --git a/core/fse.js b/core/fse.js index 7c1e70c1..8dc5aa3a 100644 --- a/core/fse.js +++ b/core/fse.js @@ -438,8 +438,7 @@ function FullScreenEditorModule(options) { toView.setText(self.message.toUserName); subjView.setText(self.message.subject); - // :TODO: set full date/time -- need a defaults dateTimeFormat - tsView.setText(moment(self.message.modTimestamp).format(self.client.currentTheme.helpers.getDateFormat())); + tsView.setText(moment(self.message.modTimestamp).format(self.client.currentTheme.helpers.getDateTimeFormat())); }; diff --git a/core/theme.js b/core/theme.js index ebc143a5..013f25d6 100644 --- a/core/theme.js +++ b/core/theme.js @@ -77,6 +77,17 @@ function loadTheme(themeID, cb) { if(_.has(theme, 'customization.defaults.timeFormat')) { return theme.customization.defaults.timeFormat[style] || format; } + return format; + }, + getDateTimeFormat : function(style) { + style = style || 'short'; + + var format = Config.defaults.dateTimeFormat[style] || 'MM/DD/YYYY h:mm a'; + + if(_.has(theme, 'customization.defaults.dateTimeFormat')) { + return theme.customization.defaults.dateTimeFormat[style] || format; + } + return format; } };