diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-09-30 23:57:27 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-10-02 10:35:52 +0200 |
commit | 4cb16b6f42ea7ea088fa4134f8fe4ccfec16a56d (patch) | |
tree | 618a3b8e1b61b6092fdb81dc7ead79c0794a453e /lisp/emacs-lisp/text-property-search.el | |
parent | d037a6a2e6f92d793b1d5403dea4c7d3ca70883c (diff) | |
download | emacs-4cb16b6f42ea7ea088fa4134f8fe4ccfec16a56d.tar.gz emacs-4cb16b6f42ea7ea088fa4134f8fe4ccfec16a56d.tar.bz2 emacs-4cb16b6f42ea7ea088fa4134f8fe4ccfec16a56d.zip |
Calc: fix business days calculation (bug43677)
The calculation of business days was broken in 2012 (probably
310e60d9454fe2 or thereabouts) when the date representation changed
epoch so that Jan 1, 1 AD became day number 1 instead of 0. Repair
this, along with an unrelated bug that prevented arbitrary holiday
weekdays from working.
Reported by Aaron Zeng.
* lisp/calc/calc-forms.el (math-to-business-day)
(math-from-business-day): Correct calculation of weekdays using Calc's
current (Rata Die) chronology. Modify loop condition to cope with odd
sets of holiday weekdays.
* test/lisp/calc/calc-tests.el (calc-business-days): New test.
Diffstat (limited to 'lisp/emacs-lisp/text-property-search.el')
0 files changed, 0 insertions, 0 deletions