-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for setting due dates on tasks #69
base: master
Are you sure you want to change the base?
Conversation
Cool! What happens when a task is overdue? |
@ashinzekene Currently there's no logic to handle due dates in the past. However I would imagine the right option here is that we show something like |
I feel like a due date has some idea of a priority, would it make sense to color things with a due date or to color things that are past due? |
@colingm Totally! I mentioned this above in the PR body :)
The high priority styling should probably extend to overdue tasks too 👍 |
@JordanAdams haha whoops awesome. Yeah overdue would be good. Nice work! |
Nice work 👍 |
May need integrating with #52, which adds an --after flag based on issue creation time. Would be nice to have similar filters based on due date also? |
@kalexmills The discussion around moment vs date-fns in there is interesting. I'll migrate this PR to date-fns off the back of that. The only thing we lose in doing so is I'll also add having a |
@JordanAdams Are you talking about https://github.com/yahoo/intl-relativeformat |
@rjoydip That's the one :) |
@@ -192,6 +250,62 @@ class Taskbook { | |||
return data; | |||
} | |||
|
|||
_filterOverdue(data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could do this date computation natively then why needs an external module.?
return data; | ||
} | ||
|
||
_filterToday(data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it's a case of the clarity gained. Under the hood, date-fns
is doing very simple date manipulations using the native Date
type. I'm not sure why we'd ditch a well tested library in favour of just doing the same implementation within Taskbook?
return data; | ||
} | ||
|
||
_filterTomorrow(data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great addition is it possible to make a task recurring? |
Implements #67
Description
Adds a new
due:
tag to task creation allowing users to specify a due date for the task.Other Features/Ideas
$tb --due @1 6d
for updating the due date.$tb -f overdue|today|tomorrow
for finding tasks based on due date.Screenshots
Due Date Assignment
Colour-Coding