const dates = [
'2023-02-20',
'2023-02-21',
'2023-02-22',
'2023-02-23',
'2023-02-24',
'2023-02-25',
'2023-02-26',
];
const nowDate = (new Date()).toISOString().split('T')[0];
dates.forEach((date) => {
const num = nowDate === date ? 1 : 0;
console.log(`[${date}] ${num}`);
});
[2023-02-20] 0
[2023-02-21] 0
[2023-02-22] 0
[2023-02-23] 0
[2023-02-24] 0
[2023-02-25] 1
[2023-02-26] 0