From ae46d11d8f54bc5c649fc4fc09209bd5050b0a37 Mon Sep 17 00:00:00 2001 From: StrawberryTea Date: Sat, 4 Jan 2025 16:18:25 -0500 Subject: [PATCH] fix: correct reversed logic in time calculation --- circadian.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/circadian.el b/circadian.el index a88328a..e618b9f 100644 --- a/circadian.el +++ b/circadian.el @@ -74,7 +74,7 @@ "Clear previous `custom-enabled-themes' and load THEME." ;; Only load the argument theme, when `custom-enabled-themes' ;; does not contain it. - + (condition-case nil (progn (run-hook-with-args 'circadian-before-load-theme-hook theme) @@ -110,11 +110,11 @@ (nth 3 tomorrow) (nth 3 now))) (month (if is-earlier - (nth 4 now) - (nth 4 tomorrow))) + (nth 4 tomorrow) + (nth 4 now))) (year (if is-earlier - (nth 5 now) - (nth 5 tomorrow)))) + (nth 5 tomorrow) + (nth 5 now)))) (encode-time 0 min hour day month year nil -1 nil))) (defun circadian-themes-parse () @@ -233,11 +233,11 @@ or set calendar-longitude: (cond ((equal nil calendar-latitude) (progn nil)) - + ((equal nil calendar-longitude) (progn nil)) - + (t))) (defun circadian-sunrise ()