MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. ewingfox
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: 24" Kitchen Infoboard with FireTV Stick

      @KamiSchami
      Hello!! This looks GREAT. I can muddle my way through back-end programming, but the front-end stuff is Greek to me - would you mind sharing what modules you have added, and a few hints about what you did with css to get this super clean look?

      I have a secret plan to try an gin up an organization board for my wife as a (late) Christmas gift - we’ll be out of the country so I’m trying to get as much done now as possible, but she’s a terrible beta tester - it has to be pretty dialed in to get her to buy in on using something (she’s a wonderful wife and mother however)

      Thank you in advance!

      E

      posted in Show your Mirror
      E
      ewingfox
    • RE: MMM-Chores - Manage and keep track of your household Chores

      @sdetweil - Thanks! I’m a total hack, so I appreciate the heads up. MUCH CLEANER. I’m not used to passing code blocks in chats, usually I’m in an SCM somewhere, causing trouble… giving my devs a headache… :D

      posted in Utilities
      E
      ewingfox
    • RE: MMM-Chores - Manage and keep track of your household Chores

      Hello! New user here, love the UI (especially the admin features!) I’m building a secret Christmas gift for my wife (who is obsessed with organization). I was about to give up on MM - until I found your module!

      Question: I see daily, weekly, monthly options - is there a feature to set reoccurring events that are Monday Friday? This is specific to kids who may have daily ‘weekday’ tasks to do that aren’t required on Saturday or Sunday. I’m happy to skip the UI - aka, create an event in the UI and then tweak the underlying config via CLI.

      Thank you!!!

      E
      EDIT:

      took a gander at your code (yeah, you are a pro - this is REALLY CLEAN (I’m a hack, but I know good work when I see it lol). Looks like an update to the getNextDate function, adding the pattern to the admin html file and the lang pack (I only added it to the enlish one (remember, hack here) seems to work pretty well. I’ll search a bit further and do a little testing to see how it behaves - but… a thing?

      E

      function getNextDate(dateStr, recurring) {
        const d = new Date(dateStr);
        if (recurring === "daily") {
          d.setDate(d.getDate() + 1);
        } else if (recurring === "weekly") {
          d.setDate(d.getDate() + 7);
        } else if (recurring === "monthly") {
          d.setMonth(d.getMonth() + 1);
        } else if (recurring === "yearly") {
          d.setFullYear(d.getFullYear() + 1);
        } else if (recurring && recurring.startsWith("every_")) {
          // Custom recurring patterns: every_X_days, every_X_weeks, first_monday_month
          const parts = recurring.split("_");
          if (parts[1] === "X" && parts[2] === "days") {
            const days = parseInt(parts[3]) || 2;
            d.setDate(d.getDate() + days);
          } else if (parts[1] === "X" && parts[2] === "weeks") {
            const weeks = parseInt(parts[3]) || 2;
            d.setDate(d.getDate() + (weeks * 7));
          } else if (recurring === "first_monday_month") {
            // First Monday of next month
            d.setMonth(d.getMonth() + 1);
            d.setDate(1);
            // Find first Monday
            while (d.getDay() !== 1) {
              d.setDate(d.getDate() + 1);
            }
          } else {
            return null;
          }
        } else {
          return null;
        }
        return d.toISOString().slice(0, 10);
      }
      

      34d49e4b-e53b-4fac-be14-3b4d6a278d73-image.png

      posted in Utilities
      E
      ewingfox
    • 1 / 1