jonsamp / date-streaks

Find a variety of streak metrics from a list of dates
MIT License
49 stars 7 forks source link

Weekly & Monthly Streaks? #11

Open oyeanuj opened 3 years ago

oyeanuj commented 3 years ago

Hi @jonsamp, thank you for creating this excellent library!

I'm curious if you'd consider adding weekly or monthly streaks to this library at some point? I could see the summary and trackRecord method being updated to add those streaks as well.

The only other place I could find which did something similar (but now the library is unmaintained): https://github.com/iancanderson/streaker-js/blob/7f5b4c79326a803d1200bf0eb9d4718d8e149695/src/streak_calculator.coffee#L54-L92

jonsamp commented 3 years ago

I like this feature idea a lot. I'm currently pretty busy with work and other projects, but happy to review a PR for this feature. Alternatively, if you could define the test cases ("x" input produces "y" output), that would help me a lot in creating the logic to accomplish this.

Sorry for the late response, thanks for opening an issue!

ghana7989 commented 3 years ago

Hi @jonsamp, thank you for creating this excellent library!

I'm curious if you'd consider adding weekly or monthly streaks to this library at some point? I could see the summary and trackRecord method being updated to add those streaks as well.

The only other place I could find which did something similar (but now the library is unmaintained): https://github.com/iancanderson/streaker-js/blob/7f5b4c79326a803d1200bf0eb9d4718d8e149695/src/streak_calculator.coffee#L54-L92

Can You give an example, for what given input you want desired output?