// 00:00 - 04:00
const A = {
start: new Date(2021, 6, 21, 24, 0),
end: new Date(2021, 6, 22, 4, 0)
}
// 22:00 - 01:00
const B = {
start: new Date(2021, 6, 21, 22, 0),
end: new Date(2021, 6, 22, 1, 0)
}
console.log('A', {
start: new Date(2021, 6, 21, 0, 0).toLocaleTimeString('sr-SR'),
end: new Date(2021, 6, 22, 4, 0).toLocaleTimeString('sr-SR')
})
console.log('B', {
start: new Date(2021, 6, 21, 22, 0).toLocaleTimeString('sr-SR'),
end: new Date(2021, 6, 22, 1, 0).toLocaleTimeString('sr-SR')
})