Closed hoelzro closed 9 years ago
I dug into this a bit, and here's the logic that HabitRPG itself uses for this:
It's not terribly complex, but to do things right, we'll probably need to use a date module like DateTime
or one of its friends.
@pjf Do you have any thoughts on how you'd like this to be implemented? I'm happy to do it myself, I just want to make sure it matches up with your vision for the project.
Considering that this module uses the Artistic license and HabitRPG is GPLv3, it would probably be best not to look at the HabitRPG code. Unfortunately, now I'm "infected", so I think someone other than me needs to write this in a blackbox environment. Is it ok if I describe the algorithm, and someone writes Perl code based on that? Or maybe I'm being too careful?
The most straightforward implementation I can see would be to add it to the HabitRPG API, provided @lefnire or the other appropriate habit people don't have any objections. :)
Otherwise I'd say that clean-rooming an implementation is definitely being too careful. :)
This is fixed now!
To reproduce:
WebService::HabitRPG
and callactive_today
on that taskHere's a dump of
_raw
from my example task:Thanks for all your hard work on this module!