cover me email request routine

This commit is contained in:
Dobromir Popov
2024-04-06 11:09:22 +03:00
parent fa5d3f4f99
commit 09db5ca8b9
11 changed files with 433 additions and 246 deletions

View File

@ -525,7 +525,9 @@ exports.getCurrentYearMonth = () => {
const month = String(currentDate.getMonth() + 1).padStart(2, '0'); // Month is 0-indexed
return `${year}-${month}`;
}
exports.getTimeFormated = function (date) {
return this.formatTimeHHmm(date);
}
// format date to 'HH:mm' time string required by the time picker
exports.formatTimeHHmm = function (input) {
// Check if the input is a string or a Date object
@ -729,3 +731,7 @@ exports.getLocalStorage = function (key, defaultValue) {
}
return defaultValue;
};
exports.root = function (req) {
return process.env.NEXT_PUBLIC_PUBLIC_URL;
}