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.

    [Default clock] Incorrect week number

    Scheduled Pinned Locked Moved Bug Hunt
    showweek clock
    14 Posts 4 Posters 4.6k Views 4 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.
    • thgmirrorT Offline
      thgmirror @sdetweil
      last edited by

      @sdetweil That is a good answer:-)

      I’m from Germany and my mirror shows 42, the answer to all questions.

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

        @thgmirror where is your system timezone set?

        u can also set language and timezone in the clock config. I don’t know which influences the moment() library more

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @sdetweil it is set to Berlin = CEST

          and my clock-config-entry is like this:

          //#################################################################################
          		{
          			disabled: false,
          			module: "clock",
          			position: "top_right",
          			config: {
          				// The config property is optional.
          				// See "Configuration options" for more information.
          				showWeek      : true,
          				showSunTimes  : true,
          				showMoonTimes : true,
          				lat           : 50.658821,
          				lon           : 7.193084,
          				}
          		},
          //#################################################################################
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @thgmirror
            last edited by

            @thgmirror is your MM running in English or German? I see the code set moment from the language set in config.js

            Sam

            How to add modules

            learning how to use browser developers window for css changes

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

              @sdetweil said in [Default clock] Incorrect week number:

              I see the code set moment from the language set in config.js

              DE

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

                @p1lspeda let’s try this

                edit clock.js

                and change line 248

                from ending like this

                weekNumber: now.week() });
                

                to this

                weekNumber: now.isoWeek() });
                

                Sam

                How to add modules

                learning how to use browser developers window for css changes

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

                  @sdetweil Hey…I have no issue:-) it is @p1lspeda

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

                    @thgmirror sorry, didn’t see u sneak a post in there. fixed

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @sdetweil I just wanted to help @p1lspeda and to give a working example.

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

                        @thgmirror very nice
                        I just didn’t look at the poster name. my fault.

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        BKeyportB 1 Reply Last reply Reply Quote 0
                        • BKeyportB Offline
                          BKeyport Module Developer @sdetweil
                          last edited by

                          Wait, Clock still uses Moment? Shame… Shame… 🤣🤣

                          The "E" in "Javascript" stands for "Easy"

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

                            @BKeyport ‘still’?! you think someone is ACTIVELY rewriting everything… ha ha ha

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            1 Reply Last reply Reply Quote 1

                            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 / 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