jeroenjanssens / data-science-at-the-command-line

Data Science at the Command Line
https://datascienceatthecommandline.com
Other
3.78k stars 766 forks source link

Sequence of dates #48

Closed hroptatyr closed 7 years ago

hroptatyr commented 8 years ago

Allow me to introduce my dateutils, along with its dateseq command to produce sequences of dates (or date/times) not only faster but more portable and flexible.

Your semantics (you specify dates as day difference relative to today) would have to go through dateadd first though, as all tools in the toolkit take absolute dates. Your example from the book would hence become:

$ dateseq `dateadd today -2` today
2016-03-19
2016-03-20
2016-03-21

So I suppose one could write a wrapper so your dseq tool wouldn't break its API.

jeroenjanssens commented 7 years ago

Thanks for letting me know about dateutils. I'll keep it in mind.