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: { computed: {
chartOptions() { chartOptions() {
const minuteTimeFormat = `${ const hourTimeFormat = this.use12HourTimeFormat ? "hh" : "HH";
this.use12HourTimeFormat ? "hh" : "HH" const minuteTimeFormat = `${hourTimeFormat}:mm${
}:mm${
this.use12HourTimeFormat ? " A" : "" this.use12HourTimeFormat ? " A" : ""
}`; }`;
return { return {

View file

@ -838,5 +838,8 @@
"successDisabled": "Disabled Successfully.", "successDisabled": "Disabled Successfully.",
"successEnabled": "Enabled Successfully.", "successEnabled": "Enabled Successfully.",
"tagNotFound": "Tag not found.", "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 * Return a given value in the format YYYY-MM-DD HH:mm:ss
* @param {any} value Value to format as date time * @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 * @returns {string} Formatted string
*/ */
datetime(value, use12HourFormat = false) { datetime(value, use12HourTimeFormat = false) {
const hourTimeFormat = use12HourTimeFormat ? "hh" : "HH";
const timeFormat = const timeFormat =
`YYYY-MM-DD ${ `YYYY-MM-DD ${hourTimeFormat}:mm:ss${
use12HourFormat ? "hh" : "HH" use12HourTimeFormat ? " A" : ""
}:mm:ss${
use12HourFormat ? " A" : ""
}`; }`;
console.log(timeFormat);
return this.datetimeFormat(value, timeFormat); return this.datetimeFormat(value, timeFormat);
}, },