bibaldo / MMM-CountUP

Just a simple progressive counter from a specific date
MIT License
4 stars 2 forks source link

[Feature] Year #1

Closed TimerWolf closed 4 years ago

TimerWolf commented 4 years ago

I would like to see the day be years instead of only have the days as last value also weeks could be nice to see...

And maybe this should be optional if you will use years/weeks/days etc....

bibaldo commented 4 years ago

@TimerWolf I will try my best. give me a couple of days

bibaldo commented 4 years ago

https://github.com/bibaldo/MMM-CountUP/pull/2

bibaldo commented 4 years ago

@TimerWolf you have the option now. Enjoy

TimerWolf commented 4 years ago

@bibaldo perfect! thanks a lot!

Bromley47 commented 4 years ago

Hi -I cannot get this feature to show on my Magic Mirror. I am not sure that there is sufficient room on my fairly small screen. Could this be the issue? I have tried positioning at top left before the date and also bottom mid position without anything showing. I have checked code and no faults returned. Also the update showed on the MM from which I assume it must be working but not sure where. Any help would be appreciated.

bibaldo commented 4 years ago

@Bromley47 please paste here your config file

Bromley47 commented 4 years ago

/ Magic Mirror Config Sample

var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

language: "en",
timeFormat: 24,
units: "metric",

modules: [
    {
        module: "alert",
    },
    {
        module: "updatenotification",
        position: "top_bar"
    },
    {

        module: "MMM-CountUP",
    },
    {
        module: "MMM-COVID19",
        position: "bottom_bar",
        config: {
        header: "Days passed since COVID19 Quarantine",
        date: "2020-03-16",
        time: "09:00:00"

        }
    },
    {

        module: "clock",
        position: "top_left"
    },
    {

         module: "calendar",
                    header: "Google Calendar",
                    position: "top_left",
                    config: {
        fade: false,
        getRelative: "12",
        timeFormat: "absolute",
        urgency: "0",
        maximumEntries: "6",
        fetchInterval: "120000",
                    calendars: [
                                    {
                    symbol: "calendar-check",
                    url: "https://calendar.google.com/calendar/ical//basic.ics",
                                    }
                            ]
                    }
            },
    {

        module: "",
        position: ""
    },
    {
        module: "currentweather",
        position: "top_right",
        config: {
            location: "Leicester",
            locationID: "3333165", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            appid: "1df05bcecdb9232c9df1e38ea5b27571",
        }
    },
    {
        module: "weatherforecast",
        position: "top_right",
        header: "Weather Forecast",
        config: {
            fade: false,
            location: "Leicester",
            locationID: "3333165", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
            appid: "1df05bcecdb9232c9df1e38ea5b27571",
        }
    },
    {
        module: "newsfeed",
        position: "top_bar",
        config: {
            feeds: [
                {
                    title: "BBC",
                    url: "http://feeds.bbci.co.uk/news/uk/rss.xml",
                }
            ],
            showSourceTitle: true,
            showPublishDate: true,
            broadcastNewsFeeds: true,
            broadcastNewsUpdates: true
        }
    },
]

};

/ DO NOT EDIT THE LINE BELOW / if (typeof module !== "undefined") {module.exports = config;}

TimerWolf commented 4 years ago

@Bromley47: That is wrong, that's not how it's says in the documentation or is it?

Try change

{
  module: "MMM-CountUP",
},

{
  module: "MMM-COVID19",
  position: "bottom_bar",
  config: {
    header: "Days passed since COVID19 Quarantine",
    date: "2020-03-16",
    time: "09:00:00"
  }
},

To

{
  module: "MMM-CountUP",
  position: "bottom_bar",
  config: {
    header: "Days passed since COVID19 Quarantine",
    date: "2020-03-16",
    time: "09:00:00"
  }
},
Bromley47 commented 4 years ago

Thanks TimerWolf will try that tomorrow..

Bromley47 commented 4 years ago

Thanks for that TimerWolf - now showing on the mirror. Have to fiddle about with the position so it doesn't interfere with other modules. Do you know how to get the time elapsed to start from the day I entered because when it came on the mirror it started at day 1. And lastly can I get rid of the seconds and minutes? This may help with space restrictions. Many thanks for your anticipated help.