• 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.

absolute date in calendar module

Scheduled Pinned Locked Moved Troubleshooting
19 Posts 9 Posters 13.0k Views 9 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.
  • Q Offline
    qqqqqqqq
    last edited by Feb 16, 2017, 12:41 PM

    Here is my main config file

    {
    			module: 'calendar',
    			header: 'Your Calendar',
    			position: 'top_left',
    			config: {
    				timeformat: 'absolute',
    				calendars: [
    					{
    						symbol: 'calendar-check-o ',
    						url: 'webcal://calendar.google.com/calendar/ical/....ics'
    					},
    					{
    						symbol: 'calendar-check-o ',
    						url: 'webcal://calendar.google.com/calendar/ical/....ics'
    					},
    					{
    						symbol: 'facebook-official ',
    						url: 'webcal://localhost:8080/modules/Cals/FbBirthday.ics'
    
    					},
    					{
    						symbol: 'calendar ',
    						url: 'webcal://calendar.google.com/c.....ics'
    					}
    				]
    			}
    		},
    		{
    			module: 'compliments',
    
    1 Reply Last reply Reply Quote 0
    • B Offline
      broberg Project Sponsor
      last edited by Feb 16, 2017, 12:42 PM

      You should also set urgency to 0

      1 Reply Last reply Reply Quote 1
      • Y Offline
        yawns Moderator
        last edited by Feb 16, 2017, 12:43 PM

        Please try to write timeFormat instead of timeformat, this is case sensitive :)
        Also try to play around with urgency

        https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar

        1 Reply Last reply Reply Quote 1
        • Q Offline
          qqqqqqqq
          last edited by Feb 16, 2017, 12:58 PM

          Okay, made both the changes, fixed the case in “timeFormat” and added

          urgency: '0',
          

          right next to the timeFormat tag.

          But, now the events appear like this

          event 1 The day after tomorrow
          event 2 Feb 19th
          event 3 Feb 21st

          Still need to fix event 1

          1 Reply Last reply Reply Quote 0
          • Y Offline
            yawns Moderator
            last edited by Feb 16, 2017, 1:00 PM

            Please replace '0' with 0

            Numbers should not be written with quotation marks

            1 Reply Last reply Reply Quote 0
            • Q Offline
              qqqqqqqq
              last edited by Feb 16, 2017, 1:10 PM

              Nope, still the same.

              Btw, i should let you know that I am start the MagicMirror by using the command

              npm start
              

              Should I be using some other method to start it? Do I need to clear cache or something like that? :slight_frown:

              Y 1 Reply Last reply Feb 16, 2017, 2:48 PM Reply Quote 0
              • Y Offline
                yawns Moderator @qqqqqqqq
                last edited by Feb 16, 2017, 2:48 PM

                @qqqqqqqq
                Starting your mirror for testing purpose is just fine.

                Please try this:

                ...
                	config: {
                		timeFormat: 'absolute',
                		urgency: 0,
                		getRelative: 0,
                		calendars: [
                ...
                
                1 Reply Last reply Reply Quote 0
                • Q Offline
                  qqqqqqqq
                  last edited by qqqqqqqq Feb 16, 2017, 5:39 PM Feb 16, 2017, 5:38 PM

                  I’ve updated the values in both, the main config file & the calendar.js (in the modules folder) but it’s still the same.

                  Here is the image. http://pasteboard.co/z6KcmVgLB.jpg

                  S 1 Reply Last reply Feb 16, 2017, 9:58 PM Reply Quote 0
                  • S Offline
                    strawberry 3.141 Project Sponsor Module Developer @qqqqqqqq
                    last edited by strawberry 3.141 Feb 17, 2017, 10:05 AM Feb 16, 2017, 9:58 PM

                    @qqqqqqqq with the current implementation this is the expected behaviour

                    } else if (event.startDate - now < 2 * oneDay && event.startDate - now > 0) {
                      if (this.translate("DAYAFTERTOMORROW") !== "DAYAFTERTOMORROW") {
                        timeWrapper.innerHTML = this.capFirst(this.translate("DAYAFTERTOMORROW"));
                      } else {
                        timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
                      }
                    }
                    

                    it will be always relative

                    EDIT: this is only for fullday events

                    Please create a github issue if you need help, so I can keep track

                    Q 1 Reply Last reply Feb 17, 2017, 6:19 PM Reply Quote 1
                    • Y Offline
                      yawns Moderator
                      last edited by Feb 17, 2017, 5:15 AM

                      I tested it yesterday and my calendar showed “tomorrow at 15:30” and “Saturday at 14:00”

                      That is as absolute as it gets, imho

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/19
                        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