Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to ignore all day events #14

Closed
nikolowry opened this issue Jun 14, 2023 · 3 comments · Fixed by #19
Closed

Add option to ignore all day events #14

nikolowry opened this issue Jun 14, 2023 · 3 comments · Fixed by #19

Comments

@nikolowry
Copy link

Please add the ability to ignore all day events. It's confusing when there are holidays and birthdays.

Attached screenshot of the experience on 2023.06.14 which is an American federal holiday named Flag Day

Screenshot from 2023-06-14 09-36-47

@krillin666
Copy link

Is there any intention of implementation of this feature ?

Maybe see how https://github.com/chmouel/gnome-next-meeting-applet does it ?

@coignard
Copy link

coignard commented Nov 3, 2023

Is there any intention of implementation of this feature ?

Maybe see how https://github.com/chmouel/gnome-next-meeting-applet does it ?

function getTodaysEvents(calendarSource) {

    const src = calendarSource;
    src._loadEvents(true);

    const today = new Date();
    today.setHours(0, 0, 0, 0); // Get event from today at midnight

    const tomorrow = new Date(today);
    tomorrow.setDate(today.getDate() + 1);

    let todaysEvents = src.getEvents(today, tomorrow);

    todaysEvents = todaysEvents.filter(event => {
        const start = event.date;
        const end = event.end;
        return !(start.getHours() === 0 && start.getMinutes() === 0 &&
                 end.getHours() === 0 && end.getMinutes() === 0);
    });

    return todaysEvents;
}

@muerwre
Copy link
Contributor

muerwre commented May 23, 2024

Thanks to @coignard, implemented and tested proposed fix in PR #19.

Hope, @artisticat1 will review and accept this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants