revert data api and fix repeating availabilities

This commit is contained in:
Dobromir Popov
2024-05-28 01:41:42 +03:00
parent f7aeea65b9
commit 57a292a9f3
3 changed files with 49 additions and 11 deletions

View File

@ -110,6 +110,9 @@ Date.prototype.getDayEuropean = function () {
return (day === 0) ? 6 : day - 1; // Convert 0 (Sunday) to 6, and decrement other days by 1
};
exports.getDayOfWeek = function (date) {
return date.getDayEuropean();
};
// Helper function to convert month name to 0-based index
exports.getMonthNames = function () {
return ["януари", "февруари", "март", "април", "май", "юни", "юли", "август", "септември", "октомври", "ноември", "декември"];