-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Currently, the get_due function expects all daily tasks to be have frequency=weekly. That is, the days of the week (within repeat) are true/false depending on whether the task is due that particular weekday.
But, since 6/11/2015, Habitica has changed to also accept frequency=daily with an everyX value corresponding to an interval and a startDate (in ISO 8601 format) for when the every X started. Obviously, this requires new code to handle it, and converting ISO 8601 to something more usable (like seconds since epoch) is nontrivial.
The User Data Display Tool handles this by including:
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment.min.js"></script>
and using Moment.js to check the date for due-ness.
It would be preferable to handle this by on-demand loading if possible, as only the get_due function would use this functionality and it would be slightly cumbersome to require moment.js (or moment.min.js) be specified in the JavaScript action as a Library (and that's assuming that loading it as a library would even work).