Jon-Michael Deldin

BMX, bike trials, & software from the Pacific Northwest

Calculating business days in Emacs

I do all of my client invoicing inside Emacs, and one thing I keep track of is an expected payment date, which is the invoice date plus NET15/NET30/etc. terms (i.e., 15 business days after the invoice date). Until now, it’s been a rough guess, but thanks to Emacs calc, it is now more precise.

For calculating the current date + some number of business days:

  1. M-x calc
  2. Type ​'​ to start an algebraic entry
  3. Enter your starting date with angle brackets, e.g., <2016-11-01>. Hit return.
  4. Enter the number of business days, e.g., 15. Hit return. Screenshot of Emacs calc buffer with only data entered.
  5. Type t + (or use M-x calc-business-days-plus) Screenshot of Emacs calc buffer after computing the business day offset.

For more info, see the manual and Chris Wellons’ post about calc.

* * *