sfsam / Itsycal

Itsycal is a tiny calendar for your Mac's menu bar. http://www.mowglii.com/itsycal
MIT License
3.26k stars 234 forks source link

Tomorrow section is showing 00:00 for multi-day events #180

Closed pakerwreah closed 3 years ago

pakerwreah commented 3 years ago
Screen Shot 2020-12-23 at 10 48 15
pakerwreah commented 3 years ago

We could also hide the years when both dates are inside the current one, and also hide the times if both are 00:00.

pakerwreah commented 3 years ago

This fixes the "issue" (maybe this behavior was intentional 🤔) But the else if (info.isEndDate == YES) is not working at all for me. It seems that the endDate of my event is on the next day, because it's a full day event, so this info.isEndDate = ([_cal isDate:date inSameDayAsDate:event.endDate] doesn't work.

Screen Shot 2020-12-23 at 12 25 59
sfsam commented 3 years ago

@pakerwreah Thanks. I will take a look, but I'm a bit busy around the holiday so it might take me a little while. I wish I had commented my code more since date computations are always trickier than they look...

sfsam commented 3 years ago

@pakerwreah Can you tell me how to reproduce this? I created an all-day event starting tomorrow that spans 2 days, but it doesn't show 00:00 like in your screenshot.

Screen Shot 2021-06-15 at 10 32 57 PM
pakerwreah commented 3 years ago

@sfsam Apparently it's Google's fault 🤦🏻‍♂️ If you create a regular event it works as expected, but if you create an Out of office event we have this issue. Even though the app and the website say that it is indeed an All-day event, you can clearly see that it's different.

normal-event out-of-office

Itsycal also thinks my events (even the normal one) ends in Jun 18, which is not true.

normal-details ooo-details ooo-end-date-00-00
sfsam commented 3 years ago

@pakerwreah I'm not sure what to do about the Google issue. I will fix the way the end date for real all-day events is reported in the popover. I have a special case for single-day all-day events, but it should be generalized for spanning all-day events as well. Thanks for catching this.

pakerwreah commented 3 years ago

If that helps, in my Calendr project I check if the event starts & ends at midnight, subtract 1 second from the end date and hide the time. That way I've solved these two issues.

(I didn't know it was Google related though, until now)

sfsam commented 3 years ago

I think 18fd946ad246e5b08f26b144e7cdcbd0b31c8ad5 and 04ecaf51af9741737b4229d911bd8db9262d01ae address these issues. For midnight events, instead of making them all-day events, I'm treating them as normal events, but handling the display of duration a bit better. I believe this treatment is more consistent with how other Calendar apps do it.