freitass / todo.txt-vim

Vim plugin for Todo.txt
486 stars 121 forks source link

Python Code for checking due dates incorrect for November #56

Closed as-kholin closed 7 years ago

as-kholin commented 7 years ago

Issue is with before.py, Line 47.

last_month_day = str((date(int(year), (int(month) + 1) % 12, 1) + - date.resolution).day) This would never work in November, as you would get a '0' instead of a '12', and there is no 0 month.

If this is adjusted to (int(month) % 12) + 1, then it corrects the issue with November, and matches all other month cases.

victal commented 7 years ago

Hello, Coincidentally, I sent a PR fixing the same problem earlier today (https://github.com/freitass/todo.txt-vim/pull/55).

One can use the plugin from that branch (or fix it locally since it's a small change) while the PR is not merged.

freitass commented 7 years ago

Just merged the PR. Thanks guys!