taskbook icon indicating copy to clipboard operation
taskbook copied to clipboard

feat: Added "--after" option

Open WellerQu opened this issue 6 years ago • 6 comments

We can use --after to filter the task data by date. like this:

tb --list done --after 20180804

or

tb --after 20180804

WellerQu avatar Aug 04 '18 07:08 WellerQu

We should probably update the help documentation as well. My understanding is that any ISO-8601 format should be parsed (https://momentjs.com/docs/#/parsing/string/) with your PR; not just the "20180806" format, which is pretty dang nifty!

knappg avatar Aug 07 '18 06:08 knappg

I think without using moment this could be possible in native way. Moment has 48-50kb lib size.

rjoydip-zz avatar Aug 07 '18 18:08 rjoydip-zz

I would suggest using date-fns it is modular and its perf is better

https://medium.com/@k2u4yt/momentjs-vs-date-fns-6bddc7bfa21e

ashinzekene avatar Aug 07 '18 20:08 ashinzekene

It looks like date-fns also supports ISO-8601, so that's cool too. I think it's good to keep perf and size in mind, but it's worth mentioning that ~50kb is still fairly small when it comes to a globally downloaded node module like this that isn't being passed up and down the wire with every request.

Moment has a bit more usage and support than date-fns right now, but it looks like date-fns is being iterated on a bit more frequently than moment is.

knappg avatar Aug 08 '18 04:08 knappg

I agree. I also think performance wise date-fns is better and I think that's important since tb takes some time to process operations

ashinzekene avatar Aug 08 '18 05:08 ashinzekene

That's a good idea, I will replace moment with date-fns. @knappg

WellerQu avatar Aug 08 '18 12:08 WellerQu