INNER CODE UNIT · JavaScript
month
ChatFAQ/ChatFAQ · admin/utils/index.js:34
let month = dateObject.getMonth() + 1;
let year = dateObject.getFullYear();
let hour = dateObject.getHours();
let minutes = dateObject.getMinutes();
// add ceroes in case of 1 digit to day, month, hour and minutes:
if (day < 10) day = `0${day}`;
if (month < 10) month = `0${month}`;
if (hour < 10) hour = `0${hour}`;
if (minutes < 10) minutes = `0${minutes}`;
return `${day}/${month}/${year} ${hour}:${minutes}`;
}
export async function solveRefPropValue(item, propName, itemSchema) {
const itemsStore = useItemsStore();
if (!itemSchema)
return;
const prop = itemSchema.properties[propName];