fix PR comments

This commit is contained in:
Substancia 2023-10-03 03:50:04 +05:30
parent 5e9d562712
commit 0fbf2f375f
3 changed files with 11 additions and 11 deletions

View File

@ -64,9 +64,8 @@ export default {
},
computed: {
chartOptions() {
const minuteTimeFormat = `${
this.use12HourTimeFormat ? "hh" : "HH"
}:mm${
const hourTimeFormat = this.use12HourTimeFormat ? "hh" : "HH";
const minuteTimeFormat = `${hourTimeFormat}:mm${
this.use12HourTimeFormat ? " A" : ""
}`;
return {

View File

@ -838,5 +838,8 @@
"successDisabled": "Disabled Successfully.",
"successEnabled": "Enabled Successfully.",
"tagNotFound": "Tag not found.",
"foundChromiumVersion": "Found Chromium/Chrome. Version: {0}"
"foundChromiumVersion": "Found Chromium/Chrome. Version: {0}",
"Time Format": "Time Format",
"12-hour": "12 Hour",
"24-hour": "24 Hour"
}

View File

@ -35,17 +35,15 @@ export default {
/**
* Return a given value in the format YYYY-MM-DD HH:mm:ss
* @param {any} value Value to format as date time
* @param {boolean} use12HourFormat Whether to use 12-hour format
* @param {boolean} use12HourTimeFormat Whether to use 12-hour format
* @returns {string} Formatted string
*/
datetime(value, use12HourFormat = false) {
datetime(value, use12HourTimeFormat = false) {
const hourTimeFormat = use12HourTimeFormat ? "hh" : "HH";
const timeFormat =
`YYYY-MM-DD ${
use12HourFormat ? "hh" : "HH"
}:mm:ss${
use12HourFormat ? " A" : ""
`YYYY-MM-DD ${hourTimeFormat}:mm:ss${
use12HourTimeFormat ? " A" : ""
}`;
console.log(timeFormat);
return this.datetimeFormat(value, timeFormat);
},