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.

    Date change

    Scheduled Pinned Locked Moved Education
    3 Posts 3 Posters 164 Views 3 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.
    • lucallmonL Offline
      lucallmon
      last edited by

      Re: MMM-History

      Anyone know how to change the date from 31/10/2024 to Oct. 31, 2024?

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        raymondjspigot @lucallmon
        last edited by raymondjspigot

        @lucallmon
        8e877299-1f5c-4e08-b6a4-c875d60bb1ce-image.png

        hi - you mean where it’s showing the date in the heading at the top? - the “TODAY IN HISTORY 02/19/2017” in the module picture (sorry, not familiar with this module)

        in MMM-History.js it looks like the header is generated with

        header.innerHTML = "Today in History  " + moment().format('L');
        

        and format('L') would give you a date as shown.

        You could try updating this line in MMM-History.js and specifying a different format?

        e.g.
        header.innerHTML = "Today in History " + moment().format('ll');

        looks like it should give you a “ShortMonth dd, yyyy” date instead. (Haven’t tried this to confirm, give it a go)

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

          @raymondjspigot i’d make a fork of the module
          clone that
          add a parameter to set the format differently
          and submit that as a pull request back to the module github

          others probably would like to change that format

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          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