miller icon indicating copy to clipboard operation
miller copied to clipboard

[feature request] datediff et al.

Open johnkerl opened this issue 3 years ago • 1 comments

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.

  • Microsoft Excel usage: https://exceljet.net/excel-functions/excel-datedif-function
  • LibreOffice Calc usage: https://help.libreoffice.org/latest/ro/text/scalc/01/func_datedif.html

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

johnkerl avatar Oct 22 '21 13:10 johnkerl

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.

derekmahar avatar Apr 14 '22 23:04 derekmahar