Zren / plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84 stars 23 forks source link

MultiDay Events show up multiple times a day, and are formatted as "All Day" in the Agenda #17

Closed Zren closed 8 years ago

Zren commented 8 years ago

http://kde-look.org/content/show.php?content=175591&forumpage=2#c487284

May be related to #14

image image

I'm unable to replicate the problem by making the same event.

It's formatted as "All Day" which means:

function isSameDate(a, b) {
    return a.getFullYear() == b.getFullYear() && a.getMonth() == b.getMonth() && a.getDate() == b.getDate();
}
    var startTime = event.start.dateTime;
    var endTime = event.end.dateTime;
    if (event.start.date) {
        // GCal ends all day events at midnight, which is technically the next day.
        // Humans consider the event to end at 23:59 the day before though.
        var dayBefore = new Date(endTime);
        dayBefore.setDate(dayBefore.getDate() - 1);
        if (isSameDate(startTime, dayBefore)) {
            return "All Day";
        } else {

is somehow happening. Since these are multiday events, .dateTime is assigned like so:

            if (eventItem.start.date) {
                eventItem.start.dateTime = new Date(eventItem.start.date + ' 00:00:00');
            } else {
                eventItem.start.dateTime = new Date(eventItem.start.dateTime);
            }
Zren commented 8 years ago

No more reports + unreproduceable, so closing.