REF remove silly while loop
This commit is contained in:
parent
f83ff47f72
commit
1000246135
|
@ -2490,12 +2490,15 @@ encountered will be returned."
|
||||||
;; (DST, leap year, different days in each month, etc). Think of this like
|
;; (DST, leap year, different days in each month, etc). Think of this like
|
||||||
;; a path function from p-chem; shifting 3 months once might be different
|
;; a path function from p-chem; shifting 3 months once might be different
|
||||||
;; than shifting by 1 month three times.
|
;; than shifting by 1 month three times.
|
||||||
(let ((next datetime)
|
(->> (list t datetime)
|
||||||
(pastp t))
|
(--unfold
|
||||||
(while pastp
|
(-let (((pastp datetime) it))
|
||||||
(setq next (org-x-dag-datetime-shift next shift shifttype)
|
(print pastp)
|
||||||
pastp (org-x-dag-datetime< next sel-datetime)))
|
(when pastp
|
||||||
next))
|
(let* ((next (org-x-dag-datetime-shift datetime shift shifttype))
|
||||||
|
(pastp (org-x-dag-datetime< next sel-datetime)))
|
||||||
|
`(,next . (,pastp ,next))))))
|
||||||
|
(-last-item)))
|
||||||
('restart
|
('restart
|
||||||
;; Next time is one repeater interval after now
|
;; Next time is one repeater interval after now
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue