• 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-Humanize-Duration

Scheduled Pinned Locked Moved Utilities
7 Posts 4 Posters 2.6k 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.
  • R Offline
    ryck Module Developer
    last edited by Nov 22, 2018, 3:42 PM

    Description

    I just had a baby, and I wanted a geeky way to keep track of his exact age, so…
    You can also use it to track any other past (or future) events!
    Underneath, it’s just a simple wrapper around HumanizeDuration.js

    Screenshots:

    MMM-Humanize-Duration

    Download:

    [card:ryck/MMM-Humanize-Duration]

    C 1 Reply Last reply Nov 22, 2018, 5:42 PM Reply Quote 5
    • C Offline
      cowboysdude Module Developer @ryck
      last edited by Nov 22, 2018, 5:42 PM

      @ryck Not ‘geeky’ at all…pretty cool!

      1 Reply Last reply Reply Quote 0
      • A Offline
        AnduriI
        last edited by Nov 26, 2018, 1:41 PM

        Indeed, very cool. I really like it.
        What is needed to add localisation to your module? My wife don’t like to ready the age of our daughter in englisch… :-)

        R 1 Reply Last reply Nov 26, 2018, 1:50 PM Reply Quote 0
        • R Offline
          ryck Module Developer @AnduriI
          last edited by ryck Nov 26, 2018, 2:08 PM Nov 26, 2018, 1:50 PM

          @andurii Thanks!

          Using another language is really easy (thanks to HumanizeDuration.js): Just pass language as an option, like:

          		options: {
          			units: ["y", "mo", "w", "d", "h"],
          			round: true,
          			language: 'de',
          			conjunction: ' and ',
          			serialComma: false,
          		},
          
          A 1 Reply Last reply Nov 27, 2018, 10:25 AM Reply Quote 0
          • A Offline
            AnduriI @ryck
            last edited by Nov 27, 2018, 10:25 AM

            @ryck thank you for pointing me to this. Maybe you could also mention this in the readme or even use the specified standard language of the mirror as value here.

            R 1 Reply Last reply Nov 27, 2018, 10:57 AM Reply Quote 0
            • R Offline
              ryck Module Developer @AnduriI
              last edited by Nov 27, 2018, 10:57 AM

              @andurii That’s a great idea, I’ll do that!

              1 Reply Last reply Reply Quote 0
              • B Offline
                bhepler Module Developer
                last edited by Nov 28, 2018, 3:01 AM

                Congratulations upon reproducing!

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