MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Cant use showEnd icloud cal

    Scheduled Pinned Locked Moved Solved Troubleshooting
    30 Posts 3 Posters 4.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • evroomE Offline
      evroom @sdetweil
      last edited by

      @sdetweil

      At first sight I do not like it too much.
      Daily repeating events have an end time now that does not make really sense (23:59) and the Holliday end time only makes sense when the dateEndFormat is extended to see the date.
      And that makes it pretty crowded in the date/time column.

      IMHO :-)

      timeFormat: "absolute",
      showEnd: true,
      showEndsOnlyWithDuration: true,
      //dateEndFormat: "HH:mm",
      dateEndFormat: "dddd MMM D - HH:mm",
      

      Screenshot 2024-10-23 at 18.20.50.png

      I currently have
      showEndsOnlyWithDuration: true,
      but
      showEndsOnlyWithDuration: false,
      does not seem to do anything.

      timeFormat: "absolute",
      showEnd: false,
      showEndsOnlyWithDuration: true,
      dateEndFormat: "HH:mm",
      //dateEndFormat: "dddd MMM D - HH:mm",
      

      Screenshot 2024-10-23 at 18.35.01.png

      Regards,

      E.J.

      MagicMirror version: 2.33.0
      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      Test environment:
      MagicMirror version: v2.33.0
      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @evroom
        last edited by

        @evroom thanks… that was what I was afraid of

        can you change line calendar.js 439 to be like this, use the FullDayEventFormat, so not different that begin

        							timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.fullDayEventDateFormat));
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        evroomE 1 Reply Last reply Reply Quote 0
        • evroomE Offline
          evroom @sdetweil
          last edited by

          @sdetweil said in Cant use showEnd icloud cal:

          calendar.js

          ~/MagicMirror/modules/default/calendar/calendar.js

          this.config.fullDayEventDateFormat
          
          showEnd: true,
          showEndsOnlyWithDuration: true,
          

          Screenshot 2024-10-23 at 19.10.49.png

          showEnd: false,
          showEndsOnlyWithDuration: true,
          

          Screenshot 2024-10-23 at 19.09.50.png

          MagicMirror version: 2.33.0
          Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
          Raspbian GNU/Linux 12 (bookworm)

          Test environment:
          MagicMirror version: v2.33.0
          Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
          Raspbian GNU/Linux 12 (bookworm)

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @evroom
            last edited by sdetweil

            @evroom that looks better , is it better?
            only w duration only applies to date-time events

            but same day shouldnt have add end show (but i compared full internal date value, which includes a utc time value which would be different)

            its ‘more’ consistent with end showing, but illogical to me to have start and end on the same day

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @sdetweil
              last edited by

              @evroom

              so try this , new line 437. only show end if the end date is different than the start date

              if (this.config.showEnd && moment(event.startDate,"x").format("YYYYMMDD") !== moment(event.endDate,"x").format("YYYYMMDD")) {
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              evroomE 1 Reply Last reply Reply Quote 0
              • evroomE Offline
                evroom @sdetweil
                last edited by

                @sdetweil

                In short, I think it is looking better now.
                To make full profit from ‘showEnd: true’ one should use a ‘dateEndFormat’ that makes sense, not like mine.
                The only thing that I notice, is that ‘showEndsOnlyWithDuration’ is not doing anything.
                In my examples I only see a change when I toggle ‘showEnd’.

                calendar.js.png

                urgency: 0,
                timeFormat: "absolute",
                dateFormat: "dddd MMM D - HH:mm",
                dateEndFormat: "HH:mm",
                fullDayEventDateFormat: "dddd MMM D",
                showEnd: true,
                showEndsOnlyWithDuration: true,
                getRelative: 0,
                

                showEnd_true_true.png

                showEnd: true,
                showEndsOnlyWithDuration: false,
                

                showEnd_true_false.png

                showEnd: false,
                showEndsOnlyWithDuration: true,
                

                showEnd_false_true.png

                showEnd: false,
                showEndsOnlyWithDuration: false,
                

                showEnd_false_false.png

                MagicMirror version: 2.33.0
                Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

                Test environment:
                MagicMirror version: v2.33.0
                Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @evroom
                  last edited by

                  @evroom

                  you don’t have a full day event across multiple days NOT repeating
                  example

                        vacation mon-friday allday 1 NON-repeating event
                  

                  repeating are handled differently
                  show start, but not repeating end
                  with sliceMultiDayEvents:true, // for REPEATING only (1 day event 5 times)

                     see each day of repeating 
                         1/5
                         2/5
                         3/5
                         ...
                         5/5
                  then next day 
                         2/5
                         etc
                  

                  @evroom said in Cant use showEnd icloud cal:

                  To make full profit from ‘showEnd: true’ one should use a ‘dateEndFormat’ that makes sense, not like mine.

                  sorry, don’t understand this, I thought prior note said TIME display on fullday events was wrong… endFormat is for events with time (IMHO)

                  The only thing that I notice, is that ‘showEndsOnlyWithDuration’ is not doing anything.

                  ok, the code here is

                  					// Add end time if showEnd
                  					if (this.config.showEnd) {
                  						if (this.config.showEndsOnlyWithDuration && event.startDate === event.endDate) {
                  							// no duration here, don't display end
                  						} else {
                  							timeWrapper.innerHTML += "-";
                  							timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat));
                  						}
                  					}
                  

                  BUT,
                  immediately AFTER this is the test for fullday events, which changes the timeWrapper

                  So, this would ONLY apply
                  not-fullday
                  not repeating
                  event start on Monday:20:00:end on Tuesday:6:00 sleep over at Bobs

                  like this Screenshot at 2024-10-24 10-45-07.png

                  I see the bug… testing 2 things to together

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @sdetweil
                    last edited by

                    @evroom
                    change lines 415 —

                    				if (this.config.timeFormat === "absolute") {
                    					// Use dateFormat
                    					timeWrapper.innerHTML = CalendarUtils.capFirst(moment(event.startDate, "x").format(this.config.dateFormat));
                    					// Add end time if showEnd
                    					if (this.config.showEnd) {
                    						if (event.startDate !== event.endDate) {
                    							//  duration here, display end if requested
                    						  if(this.config.showEndsOnlyWithDuration){
                    								timeWrapper.innerHTML += "-";
                    								timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat));
                    							}
                    						}
                    					}
                    					// For full day events we use the fullDayEventDateFormat
                    					if (event.fullDayEvent) {
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    evroomE 1 Reply Last reply Reply Quote 0
                    • evroomE Offline
                      evroom @sdetweil
                      last edited by evroom

                      @sdetweil

                      Sorry, do not want to cause confusion.
                      One should probably not do a quick test right after a full working day:-)
                      The number of test cases seems endless.

                      Do I remove the earlier changes ((lines 437 and 439) before changing line 415 ?

                      MagicMirror version: 2.33.0
                      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                      Raspbian GNU/Linux 12 (bookworm)

                      Test environment:
                      MagicMirror version: v2.33.0
                      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                      Raspbian GNU/Linux 12 (bookworm)

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        sdetweil @evroom
                        last edited by

                        @evroom said in Cant use showEnd icloud cal:

                        The number of test cases seems endless.

                        indeed… calendar is a tricky beast

                        Do I remove the earlier changes ((lines 437 and 439) before changing line 415 ?
                        no… the end of this change is just before the prior , match up that last line

                        working on getting this into the update now, creating testcases!

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil
                          last edited by sdetweil

                          I have posted an updated fixcaldates2

                          this also resolves the showEndsOnlyWithDuration
                          and adds support for showEnd:true with full day events (non-repeating)
                          like vacation mon-fri, all day

                          just

                          git pull
                          

                          to update…
                          this is my fork, not the official pull request at this time

                          if you are just getting this for the 1st time. do

                          git clone https://github.com/sdetweil/MagicMirror.git newmm
                          cd newmm
                          git checkout fixcaldates2
                          npm run install-mm
                          

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          evroomE 1 Reply Last reply Reply Quote 0
                          • evroomE Offline
                            evroom @sdetweil
                            last edited by

                            @sdetweil

                            Sam,

                            The option showEndsOnlyWithDuration is not described yet on https://docs.magicmirror.builders/modules/calendar.html.

                            The interaction / dependancy with showEnd also needs to be documented.

                            I do not know if documentation issues also can / should be done on https://github.com/MagicMirrorOrg/MagicMirror.

                            MagicMirror version: 2.33.0
                            Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                            Raspbian GNU/Linux 12 (bookworm)

                            Test environment:
                            MagicMirror version: v2.33.0
                            Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                            Raspbian GNU/Linux 12 (bookworm)

                            evroomE S 2 Replies Last reply Reply Quote 0
                            • evroomE Offline
                              evroom @evroom
                              last edited by

                              @sdetweil

                              Sam,

                              Whilst testing your last changes, I sort of see a need for a new date format parameter.
                              For an event with duration, spanning multiple days.
                              E.g. spanningDayEventDateFormat.

                              [TestCal: TIMESPAN_HOLIDAY]

                              BEGIN:VEVENT
                              DTSTART:20241125T110000Z
                              DTEND:20241127T160000Z
                              DTSTAMP:20241026T091719Z
                              UID:1lk06o70p9bp21ln3pdfda4ng0@google.com
                              CREATED:20241026T090035Z
                              LAST-MODIFIED:20241026T090035Z
                              SEQUENCE:0
                              STATUS:CONFIRMED
                              SUMMARY:TestCal: TIMESPAN_HOLIDAY
                              TRANSP:OPAQUE
                              END:VEVENT
                              

                              For events with duration. spanning one night, like an overnight flight, it is not really necessary, but not really bad either.

                              [TestCal: OVERNIGHT_FLIGH]

                              BEGIN:VEVENT
                              DTSTART:20241202T190000Z
                              DTEND:20241203T030000Z
                              DTSTAMP:20241026T091719Z
                              UID:0s4flhmaf7p6q5atemshns4upp@google.com
                              CREATED:20241026T090148Z
                              LAST-MODIFIED:20241026T090215Z
                              SEQUENCE:0
                              STATUS:CONFIRMED
                              SUMMARY:TestCal: OVERNIGHT_FLIGHT
                              TRANSP:OPAQUE
                              END:VEVENT
                              

                              The reasoning behind it is following:
                              For a ‘normal’, single, event I am not really interested in the full end date format (dateEndFormat).
                              That is why I normally use dateEndFormat: "HH:mm".
                              But for an event with duration, spanning multiple days, the setting dateEndFormat: "ddd MMM D - HH:mm" makes more sense.

                              dateFormat: “ddd MMM D - HH:mm”
                              dateEndFormat: “HH:mm”
                              fullDayEventDateFormat: “ddd MMM D”
                              [good for normal events, ‘bad’ for spanning events]:
                              20241026_TestCal_true_true_timespan_hhmm.png

                              dateFormat: “ddd MMM D - HH:mm”
                              dateEndFormat: “ddd MMM D - HH:mm”
                              fullDayEventDateFormat: “ddd MMM D”
                              [‘bad’ for normal events, good for spanning events]:
                              20241026_TestCal_true_true_timespan_DDMMhhmm.png

                              I hope I could explain it well enough.
                              And that it makes sense. :-)

                              Best regards,

                              E.J.

                              MagicMirror version: 2.33.0
                              Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                              Raspbian GNU/Linux 12 (bookworm)

                              Test environment:
                              MagicMirror version: v2.33.0
                              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                              Raspbian GNU/Linux 12 (bookworm)

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @evroom
                                last edited by

                                @evroom there is a documentation repo

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                evroomE 1 Reply Last reply Reply Quote 0
                                • evroomE Offline
                                  evroom @sdetweil
                                  last edited by

                                  @sdetweil said in Cant use showEnd icloud cal:

                                  @evroom there is a documentation repo

                                  Found it:

                                  https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues

                                  MagicMirror version: 2.33.0
                                  Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                                  Raspbian GNU/Linux 12 (bookworm)

                                  Test environment:
                                  MagicMirror version: v2.33.0
                                  Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                  Raspbian GNU/Linux 12 (bookworm)

                                  evroomE 1 Reply Last reply Reply Quote 0
                                  • evroomE Offline
                                    evroom @evroom
                                    last edited by

                                    @evroom said in Cant use showEnd icloud cal:

                                    @sdetweil said in Cant use showEnd icloud cal:

                                    @evroom there is a documentation repo

                                    Found it:

                                    https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues

                                    Opened:
                                    https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues/266

                                    MagicMirror version: 2.33.0
                                    Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                                    Raspbian GNU/Linux 12 (bookworm)

                                    Test environment:
                                    MagicMirror version: v2.33.0
                                    Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                    Raspbian GNU/Linux 12 (bookworm)

                                    S 2 Replies Last reply Reply Quote 1
                                    • S Offline
                                      sdetweil @evroom
                                      last edited by sdetweil

                                      @evroom and thinking about it, i think i just messed up the implementation (Which was broken already)

                                      showEnd:true

                                      should show the end for all events fullday or not

                                      showEndsOnlyWithDuration:true should NOT show the end for full day events but DO show end for others ( because of showEnd:true)

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        sdetweil @evroom
                                        last edited by

                                        @evroom i replied there

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        1 Reply Last reply Reply Quote 0
                                        • S Offline
                                          sdetweil @sdetweil
                                          last edited by sdetweil

                                          @evroom I just posted an update to fix showEndsOnlyWithDuration

                                          doc added
                                          Screenshot at 2024-10-26 09-45-05.png

                                          Sam

                                          How to add modules

                                          learning how to use browser developers window for css changes

                                          evroomE 1 Reply Last reply Reply Quote 0
                                          • evroomE Offline
                                            evroom @sdetweil
                                            last edited by

                                            @sdetweil said in Cant use showEnd icloud cal:

                                            @evroom I just posted an update to fix showEndsOnlyWithDuration

                                            Okay, so to recap (me talking to myself :-)):
                                            It basically applies to a fullday event that spans multiple days.
                                            Because a single fullday event has an equal start and end date.
                                            And a fullday reoccurring event is just X times a single fullday event.

                                            Google Calendar makes it a bit more difficult to understand the begin and end dates (hence the need to calculate and adjust) :

                                            TestCal: SINGLE_FULLDAY_EVENT
                                            Thursday, October 31

                                            BEGIN:VEVENT
                                            DTSTART;VALUE=DATE:20241031
                                            DTEND;VALUE=DATE:20241101

                                            TestCal: FULLDAY_EVENT_SPANS_3_DAYS
                                            November 1 – 3, 2024

                                            DTSTART;VALUE=DATE:20241101
                                            DTEND;VALUE=DATE:20241104

                                            Here a fullday event that spans multiple days:

                                            BEGIN:VEVENT
                                            DTSTART;VALUE=DATE:20241101
                                            DTEND;VALUE=DATE:20241104
                                            DTSTAMP:20241026T152207Z
                                            UID:2srults5ctu7t3n4piick00gv8@google.com
                                            CREATED:20241026T152154Z
                                            LAST-MODIFIED:20241026T152154Z
                                            SEQUENCE:0
                                            STATUS:CONFIRMED
                                            SUMMARY:TestCal: FULLDAY_EVENT_SPANS_3_DAYS
                                            TRANSP:TRANSPARENT
                                            END:VEVENT
                                            

                                            ‘prevent’ means: when set to false (default), you will see the end date.
                                            When set to true, you will not see the end date.

                                            Test with latest updates (git pull on Sat 26 Oct 16:51:00 CEST 2024):

                                            showEnd: true.
                                            showEndsOnlyWithDuration: false,
                                            

                                            20241026_TestCal_true_false_new_2.png !

                                            showEnd: true.
                                            showEndsOnlyWithDuration: true,
                                            

                                            20241026_TestCal_true_true_new_2.png !

                                            MagicMirror version: 2.33.0
                                            Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                                            Raspbian GNU/Linux 12 (bookworm)

                                            Test environment:
                                            MagicMirror version: v2.33.0
                                            Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                                            Raspbian GNU/Linux 12 (bookworm)

                                            S 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy