Some more stats

This commit is contained in:
Bryan Ashby
2020-11-09 21:32:34 -07:00
parent 52ae983cb4
commit d6cc53c263
6 changed files with 61 additions and 6 deletions

View File

@@ -689,4 +689,20 @@ exports.MenuModule = class MenuModule extends PluginModule {
return cb(good ? null : Errors.Invalid(`Invalid or missing config option "${firstBadKey}" (${badReason})`));
}
// Various common helpers
getDateFormat(defaultStyle='short') {
return this.config.dateFormat ||
this.client.currentTheme.helpers.getDateFormat(defaultStyle);
}
getTimeFormat(defaultStyle='short') {
return this.config.timeFormat ||
this.client.currentTheme.helpers.getTimeFormat(defaultStyle);
}
getDateTimeFormat(defaultStyle='short') {
return this.config.dateTimeFormat ||
this.client.currentTheme.helpers.getDateTimeFormat(defaultStyle);
}
};