• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Calendar shows hours left at holidays

Scheduled Pinned Locked Moved Solved Troubleshooting
3 Posts 2 Posters 566 Views 2 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.
  • M Offline
    MacG
    last edited by Sep 20, 2021, 10:42 AM

    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 Sep 20, 2021, 10:55 AM Reply Quote 0
    • S Away
      sdetweil @MacG
      last edited by Sep 20, 2021, 10:55 AM

      @macg I think that is getRelative:0

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Sep 20, 2021, 11:43 AM Reply Quote 0
      • M Offline
        MacG @sdetweil
        last edited by MacG Sep 20, 2021, 12:08 PM Sep 20, 2021, 11:43 AM

        @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
        1 / 1
        • First post
          3/3
          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