🔀 Rebase with dev

This commit is contained in:
ajnart
2022-06-08 08:09:59 +02:00
committed by Aimsucks
parent b0f4a91878
commit 949deacd6d

View File

@@ -111,26 +111,26 @@ function DayComponent(props: any) {
props; props;
const [opened, setOpened] = useState(false); const [opened, setOpened] = useState(false);
const day = renderdate.getDate(); const day = renderdate.toDateString();
const readarrFiltered = readarrmedias.filter((media: any) => { const readarrFiltered = readarrmedias.filter((media: any) => {
const date = new Date(media.releaseDate); const date = new Date(media.releaseDate);
return date.getDate() === day && date.getMonth() === renderdate.getMonth(); return date.toDateString() === day;
}); });
const lidarrFiltered = lidarrmedias.filter((media: any) => { const lidarrFiltered = lidarrmedias.filter((media: any) => {
const date = new Date(media.releaseDate); const date = new Date(media.releaseDate);
// Return true if the date is renerdate without counting hours and minutes // Return true if the date is renerdate without counting hours and minutes
return date.getDate() === day && date.getMonth() === renderdate.getMonth(); return date.toDateString() === day;
}); });
const sonarrFiltered = sonarrmedias.filter((media: any) => { const sonarrFiltered = sonarrmedias.filter((media: any) => {
const date = new Date(media.airDateUtc); const date = new Date(media.airDateUtc);
return date.getDate() === day && date.getMonth() === renderdate.getMonth(); return date.toDateString() === day;
}); });
const radarrFiltered = radarrmedias.filter((media: any) => { const radarrFiltered = radarrmedias.filter((media: any) => {
const date = new Date(media.inCinemas); const date = new Date(media.inCinemas);
// Return true if the date is renerdate without counting hours and minutes // Return true if the date is renerdate without counting hours and minutes
return date.getDate() === day && date.getMonth() === renderdate.getMonth(); return date.toDateString() === day;
}); });
if ( if (
sonarrFiltered.length === 0 && sonarrFiltered.length === 0 &&