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

MMM-Snow Activation at Month

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 2.1k 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.
  • S Offline
    Sebi76
    last edited by Sebi76 Feb 25, 2018, 4:13 PM Feb 25, 2018, 4:12 PM

    Hello Guys,

    i want to modify the Module MMM-Snow. The Module should only activate by Month. I test it with this Function only for Dezember…Later in Arry for Dezember until Februar…

    var D = new Date();
    var month = D.getmonth

    if(month==11)[
    Module
    …
    …
    ]

    but it works not! Were is the Problem?

    1 Reply Last reply Reply Quote 0
    • C Offline
      cowboysdude Module Developer
      last edited by cowboysdude Feb 26, 2018, 1:03 PM Feb 26, 2018, 1:31 AM

      Just do an if statement inside the getDom function like this…

      var D = new Date();
      var month = D.getmonth;

      If (month === “11”) {
      magic happens here…
      }

      1 Reply Last reply Reply Quote 0
      • S Offline
        Sebi76
        last edited by Feb 26, 2018, 6:24 PM

        OK, i test this. But it works not by replaces “11” to “1” because February

        1 Reply Last reply Reply Quote 0
        • P Offline
          PrincesseLulu
          last edited by PrincesseLulu Feb 28, 2018, 7:47 AM Feb 28, 2018, 7:43 AM

          To do:

          • Create the configure property for this option.
          • Make it and do a pull request to the MMM-Snow github project.

          I read it here beacose i can’t do thats for this time. If i can more later i do that but if anywone can do that it’s cool.

          1 Reply Last reply Reply Quote 0
          • S Offline
            Sebi76
            last edited by Dec 22, 2018, 8:23 PM

            Lost my settings. Now I’m faced with the problem again. It doesn’t work. Is it correct that d.getmonth returns the value 11 for December?

            1 Reply Last reply Reply Quote 0
            • S Offline
              Sebi76
              last edited by Dec 24, 2018, 10:34 PM

              @cowboysdude said in MMM-Snow Activation at Month:

              var D = new Date();
              var month = D.getmonth;
              If (month === “11”) {
              magic happens here…
              }

              ok i found the Problem

              not var month = D.getmonth; but var month = D.getmonth();

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