-
Notifications
You must be signed in to change notification settings - Fork 11
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
wip research ability to create simple report of done tasks #390
Conversation
it is just a rough draft, I don't have much time for now. I will have time on Friday/Saturday. @alanvardy how do you like Also, I see that we have very similar functions in the task list if has_flag(matches.clone(), "scheduled") {
projects::scheduled_items(&config, &project)
} else if has_flag(matches.clone(), "done-yesterday") {
projects::completed_items(&config, &project)
} else {
projects::all_items(&config, &project)
} scheduled_items, completed_items, all_items @alanvardy how do you like the idea? |
👍
I like it!
Yes there is lots of duplicate code in there, I'm interested in seeing what you come up with! |
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.
So far so good, I'm interested in using this feature when it is done
@@ -9,6 +10,7 @@ use std::cmp::Reverse; | |||
use std::fmt::Display; | |||
|
|||
use crate::config::Config; | |||
use crate::time::timezone_from_str; |
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.
use crate::time::timezone_from_str; | |
use crate::time; |
@@ -253,6 +256,13 @@ impl Item { | |||
Ok(DateTimeInfo::DateTime { .. }) | |||
) | |||
} | |||
|
|||
pub fn get_completed_at(&self, config: &Config) -> DateTime<Tz> { | |||
let tz = timezone_from_str(&config.timezone); |
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.
let tz = timezone_from_str(&config.timezone); | |
let tz = time::timezone_from_str(&config.timezone); |
#411 |
Sorry about that, I'm hoping that by splitting out into more modules we can conflict less in the future. There's a buncha spaghetti code in there! |
I have started exploring of the ability to create simple reports discussed here #355 (comment)