stuff
This commit is contained in:
parent
7774bd0074
commit
13d1c873ad
|
@ -3925,7 +3925,7 @@ module.exports = (_ => {
|
|||
if (timeObj.toString() == "Invalid Date" || typeof timeObj.toLocaleDateString != "function") return "";
|
||||
|
||||
let languageId = config.language && BDFDB.LanguageUtils.languages[config.language] ? config.language : BDFDB.LanguageUtils.getLanguage().id, timeString = "";
|
||||
if (typeof config.formatString != "string") {
|
||||
if (!config.formatString || typeof config.formatString != "string") {
|
||||
const cutOffSeconds = string => {
|
||||
return string.replace(/(.{1,2}:.{1,2}):.{1,2}(.*)/, "$1$2").replace(/(.{1,2}\..{1,2})\..{1,2}(.*)/, "$1$2").replace(/(.{1,2} h .{1,2} min) .{1,2} s(.*)/, "$1$2");
|
||||
};
|
||||
|
|
|
@ -383,7 +383,7 @@ module.exports = (_ => {
|
|||
return BDFDB.TimeUtils.suppress(_ => {
|
||||
return BDFDB.StringUtils.formatTime(time, Object.assign({
|
||||
language: languageId,
|
||||
formatString: formats[isTooltip ? "ownFormatTool" : "ownFormat"]
|
||||
formatString: languageId != "own" && (formats[isTooltip ? "ownFormatTool" : "ownFormat"])
|
||||
}, settings, amounts));
|
||||
}, "Failed to create Timestamp!", config.info)() || "Failed Timestamp";
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ module.exports = (_ => {
|
|||
getTimestamp (languageId, time) {
|
||||
return BDFDB.StringUtils.formatTime(time, Object.assign({
|
||||
language: languageId,
|
||||
formatString: formats.ownFormat
|
||||
formatString: languageId != "own" && formats.ownFormat
|
||||
}, settings, amounts));
|
||||
}
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ module.exports = (_ => {
|
|||
getTimestamp (languageId, time) {
|
||||
return BDFDB.StringUtils.formatTime(time, Object.assign({
|
||||
language: languageId,
|
||||
formatString: formats.ownFormat
|
||||
formatString: languageId != "own" && formats.ownFormat
|
||||
}, settings, amounts));
|
||||
}
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ module.exports = (_ => {
|
|||
getTimestamp (languageId, time) {
|
||||
return BDFDB.StringUtils.formatTime(time, Object.assign({
|
||||
language: languageId,
|
||||
formatString: formats.ownFormat
|
||||
formatString: languageId != "own" && formats.ownFormat
|
||||
}, settings, amounts));
|
||||
}
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@ module.exports = (_ => {
|
|||
getTimestamp (languageId, time) {
|
||||
return BDFDB.StringUtils.formatTime(time, Object.assign({
|
||||
language: languageId,
|
||||
formatString: formats.ownFormat
|
||||
formatString: languageId != "own" && formats.ownFormat
|
||||
}, settings, amounts));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue