taskbook
taskbook copied to clipboard
feat: Added "--after" option
We can use --after
to filter the task data by date. like this:
tb --list done --after 20180804
or
tb --after 20180804
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!
I think without using moment
this could be possible in native way. Moment has 48-50kb lib size.
I would suggest using date-fns it is modular and its perf is better
https://medium.com/@k2u4yt/momentjs-vs-date-fns-6bddc7bfa21e
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.
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
That's a good idea, I will replace moment with date-fns. @knappg