const timestamp = (year, month = 1, day = 1) => new Date(year, month - 1, day).getTime();
const entries = [
{
type: 'error',
date: timestamp(2020, 4, 30)
},
{
type: 'log',
date: timestamp(2020, 4, 29)
},
{
type: 'info',
date: timestamp(2020, 4, 25)
}
];
const date = new Date();
const today = timestamp(date.getFullYear(), date.getMonth() + 1, date.getDate());
const interval = 24 * 60 * 60 * 1000;
const entry = entries.find(entry => (entry.date >= today && entry.date <= today + interval));
console.log(entry); // { type: 'error', date: 1588183200000 }