Блондинка,
function getDifference(year) {
var razn = 0;
if (year >= 300 && year <= 499) razn = 1;
else if (year >= 500 && year <= 599) razn = 2;
else if (year >= 600 && year <= 699) razn = 3;
else if (year >= 700 && year <= 899) razn = 4;
else if (year >= 900 && year <= 999) razn = 5;
else if (year >= 1000 && year <= 1099) razn = 6;
else if (year >= 1100 && year <= 1299) razn = 7;
else if (year >= 1300 && year <= 1399) razn = 8;
else if (year >= 1400 && year <= 1499) razn = 9;
else if (year >= 1500 && year <= 1699) razn = 10;
else if (year >= 1700 && year <= 1799) razn = 11;
else if (year >= 1800 && year <= 1899) razn = 12;
else if (year >= 1900 && year <= 2099) razn = 13;
else if (year >= 2100 && year <= 2199) razn = 14;
else if (year >= 2200 && year <= 2299) razn = 15;
else if (year >= 2300 && year <= 2399) razn = 16;
else if (year >= 2500 && year <= 2599) razn = 17;
else if (year >= 2600 && year <= 2699) razn = 18;
else if (year >= 2700 && year <= 2899) razn = 19;
else if (year >= 2900 && year <= 2999) razn = 20;
return razn;
}
// Все даты по юлианскому календарю отображаем в едином формате
function formatDate_ul(date) {
var razn = getDifference(date.getFullYear());
var arrNameDay = "Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота".split(",");
var weekday = arrNameDay[(date.getDay() + razn) % 7] + "<br>";
return weekday + date.toLocaleDateString("ru", {
day: "numeric",
month: "long",
year: "numeric"
});
}