johnkerl / miller

Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON
https://miller.readthedocs.io
Other
9.02k stars 217 forks source link

[feature request] datediff et al. #708

Open johnkerl opened 3 years ago

johnkerl commented 3 years ago

Calculating various kinds of differences between two days is absolutely necessary in my line of work.

My suggestion is that DATEDIF function provided by major spreadsheets should be developed for Miller at the earliest.

PS: I've been using R for a few years which has a dedicated package lubridate for making date operations easier. The basic documentation is available at https://cran.r-project.org/web/packages/lubridate/vignettes/lubridate.html and its development/cheatsheets may be seen at https://github.com/tidyverse/lubridate. It covers all the date operations that I've needed until now. But I guess it would be too much to suggest at this time.

Originally posted by @san-r in https://github.com/johnkerl/miller/discussions/706#discussioncomment-1517518

derekmahar commented 2 years ago

You may find datediff, one of the commands available in the dateutils collection of date and time command line tools, useful for verifying the output of the Miller implementation of DATEDIFF.