From ab92f6fbddfcdf86a54438635c8ccb2aa96d642c Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 14 Apr 2022 19:13:44 -0400 Subject: [PATCH] FIX quarter date calculations --- local/lib/org-x/org-x-dag.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/lib/org-x/org-x-dag.el b/local/lib/org-x/org-x-dag.el index 025b44e..e280772 100644 --- a/local/lib/org-x/org-x-dag.el +++ b/local/lib/org-x/org-x-dag.el @@ -185,11 +185,11 @@ (defun org-x-dag-quarter-to-date (quarter) (-let (((y q) quarter)) - (list y (1+ (* q 3)) 1))) + (list y (1+ (* (1- q) 3)) 1))) (defun org-x-dag-date-to-quarter (date) (-let (((y m _) date)) - (list y (1+ (/ m 3))))) + (list y (1+ (/ (1- m) 3))))) (defun org-x-dag-date-to-quarter-start (date) (->> (org-x-dag-date-to-quarter date)