bibaldo / MMM-CountUP

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

start month is off #3

Closed sdetweil closed 4 years ago

sdetweil commented 4 years ago

javascript date and moment use 0-11 as month..

so 2020-03-16 means april, not march after converting from string to date, subtract 1 month

Bromley47 commented 4 years ago

{

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

Tried the above but still showing 2 days

Bromley47 commented 4 years ago

which I assume is days passed since April 16th.?

elgeorgie commented 4 years ago

Same issue here. Month is off.

sdetweil commented 4 years ago

@elgeorgie use from my repo.. when just showing the days ... the calculator doesn't use the years/months..

https://github.com/sdetweil/MMM-CountUP rename the existing out of the way, then git clone mine and restart MM

elgeorgie commented 4 years ago

@elgeorgie use from my repo.. when just showing the days ... the calculator doesn't use the years/months..

https://github.com/sdetweil/MMM-CountUP rename the existing out of the way, then git clone mine and restart MM

Works like a charm! Thanks @sdetweil !!

bibaldo commented 4 years ago

@sdetweil thanks for your PR. It was merged today. I was off during these days.

@elgeorgie you can still use this repo if you like. It's up-to-date now