MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED Calendar shows hours left at holidays

    Troubleshooting
    2
    3
    252
    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.
    • M
      MacG last edited by

      I use the default calendar to display the holidays (“Feiertage”) here in Germany. For example, today is one and is displayed that it is “Noch 14 Stunden” (14 hours left). But there I would like to have the display “Heute” (today) or the date. Also because the 14 hours are calculated using UTC time and not the local time.

      I can’t find anything suitable in the calendar configuration. Does anyone know the solution?

      MMM-default-calendar.png

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

        @macg I think that is getRelative:0

        Sam

        Create a working config
        How to add modules

        M 1 Reply Last reply Reply Quote 0
        • M
          MacG @sdetweil last edited by MacG

          @sdetweil The timeFormat is relative by default. I used getRelative: 0 without changes at the display. Also with timeFormat: “absolute” only the display changed since hours instead of remaining hours. But with an additional urgency: 0 it works. Thank you, Sam!

          Oh yes, an adjustment of the format was also necessary. The dateFormat was no longer applied.

          Before:

          {
          	module: "calendar",
          	header: "Feiertage",
          	position: "top_left",
          	config: {
          		dateFormat: "D. MMM",
          		displaySymbol: false,
          		broadcastEvents: false,
          		hideTime: true,
          		fadePoint: 0.05,
          		fetchInterval: 24 * 60 * 60 * 1000,    // 1 day
          		calendars: [
          			{
          			maximumEntries: 3,
          			url: "webcal://localhost:8080/modules/calendar/feiertage.ics"
          			}
          		]
          	}
          },
          

          After changes:

          {
          	module: "calendar",
          	header: "Feiertage",
          	position: "top_left",
          	config: {
          		dateFormat: "D. MMM",
          		displaySymbol: false,
          		broadcastEvents: false,
          		hideTime: true,
          		timeFormat: "absolute",
          		getRelative: 0,
          		urgency: 0,
          		fullDayEventDateFormat: "D. MMM",
          		nextDaysRelative: true,   // shows Tomorrow and Today
          		fadePoint: 0.05,
          		fetchInterval: 24 * 60 * 60 * 1000,    // 1 day
          		calendars: [
          			{
          			maximumEntries: 3,
          			url: "webcal://localhost:8080/modules/calendar/feiertage.ics"
          			}
          		]
          	}
          },
          

          I can well do without the “today”.

          MMM-default-calendar_2.png

          Edit: The “Today” comes with the setting: nextDaysRelative: true.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy