НА
Size: a a a
НА
СЧ
function checkDateIsWorking(dateUnixFormatted) {
if (isNaN(Date.parse(dateUnixFormatted)) === false) {
return "data is not valid\nformat UTC or Date.now()"
}
let dd = dateUnixFormatted.getDate();
let mm = dateUnixFormatted.getMonth()+1;
let yyyy = dateUnixFormatted.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
let dateTmp = yyyy+mm+dd;
console.log(dateTmp);
let urlServer = "https://isdayoff.ru/" + dateTmp;
xhr.open('GET', urlServer, false);
xhr.send();
if (xhr.status !== 200) {
if (xhr.status === 400 && "100" === xhr.statusText){
return "data is not valid\nformat YYYYMMDD"
}
if (xhr.status === 404 && "101" === xhr.statusText){
return "data not Found"
}
// Error, Output Example: 404: Not Found
return xhr.status + ': ' + xhr.statusText
} else {
return xhr.responseText === '0';
}
}
НА
function checkDateIsWorking(dateUnixFormatted) {
if (isNaN(Date.parse(dateUnixFormatted)) === false) {
return "data is not valid\nformat UTC or Date.now()"
}
let dd = dateUnixFormatted.getDate();
let mm = dateUnixFormatted.getMonth()+1;
let yyyy = dateUnixFormatted.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
let dateTmp = yyyy+mm+dd;
console.log(dateTmp);
let urlServer = "https://isdayoff.ru/" + dateTmp;
xhr.open('GET', urlServer, false);
xhr.send();
if (xhr.status !== 200) {
if (xhr.status === 400 && "100" === xhr.statusText){
return "data is not valid\nformat YYYYMMDD"
}
if (xhr.status === 404 && "101" === xhr.statusText){
return "data not Found"
}
// Error, Output Example: 404: Not Found
return xhr.status + ': ' + xhr.statusText
} else {
return xhr.responseText === '0';
}
}
А
function checkDateIsWorking(dateUnixFormatted) {
if (isNaN(Date.parse(dateUnixFormatted)) === false) {
return "data is not valid\nformat UTC or Date.now()"
}
let dd = dateUnixFormatted.getDate();
let mm = dateUnixFormatted.getMonth()+1;
let yyyy = dateUnixFormatted.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
let dateTmp = yyyy+mm+dd;
console.log(dateTmp);
let urlServer = "https://isdayoff.ru/" + dateTmp;
xhr.open('GET', urlServer, false);
xhr.send();
if (xhr.status !== 200) {
if (xhr.status === 400 && "100" === xhr.statusText){
return "data is not valid\nformat YYYYMMDD"
}
if (xhr.status === 404 && "101" === xhr.statusText){
return "data not Found"
}
// Error, Output Example: 404: Not Found
return xhr.status + ': ' + xhr.statusText
} else {
return xhr.responseText === '0';
}
}
let dateTmp = yyyy+mm+dd;
DE
function checkDateIsWorking(dateUnixFormatted) {
if (isNaN(Date.parse(dateUnixFormatted)) === false) {
return "data is not valid\nformat UTC or Date.now()"
}
let dd = dateUnixFormatted.getDate();
let mm = dateUnixFormatted.getMonth()+1;
let yyyy = dateUnixFormatted.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
let dateTmp = yyyy+mm+dd;
console.log(dateTmp);
let urlServer = "https://isdayoff.ru/" + dateTmp;
xhr.open('GET', urlServer, false);
xhr.send();
if (xhr.status !== 200) {
if (xhr.status === 400 && "100" === xhr.statusText){
return "data is not valid\nformat YYYYMMDD"
}
if (xhr.status === 404 && "101" === xhr.statusText){
return "data not Found"
}
// Error, Output Example: 404: Not Found
return xhr.status + ': ' + xhr.statusText
} else {
return xhr.responseText === '0';
}
}
t
t
В
function checkDateIsWorking(dateUnixFormatted) {
if (isNaN(Date.parse(dateUnixFormatted)) === false) {
return "data is not valid\nformat UTC or Date.now()"
}
let dd = dateUnixFormatted.getDate();
let mm = dateUnixFormatted.getMonth()+1;
let yyyy = dateUnixFormatted.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
let dateTmp = yyyy+mm+dd;
console.log(dateTmp);
let urlServer = "https://isdayoff.ru/" + dateTmp;
xhr.open('GET', urlServer, false);
xhr.send();
if (xhr.status !== 200) {
if (xhr.status === 400 && "100" === xhr.statusText){
return "data is not valid\nformat YYYYMMDD"
}
if (xhr.status === 404 && "101" === xhr.statusText){
return "data not Found"
}
// Error, Output Example: 404: Not Found
return xhr.status + ': ' + xhr.statusText
} else {
return xhr.responseText === '0';
}
}
НА