org-closest-date
org-closest-date is a compiled Lisp function in `org.el
'.
(org-closest-date START CURRENT CHANGE PREFER SHOW-ALL)
Find the date closest to CURRENT that is consistent with START and CHANGE.
When PREFER is `past', return a date that is either CURRENT or past.
When PREFER is `future', return a date that is either CURRENT or future.
When SHOW-ALL is nil, only return the current occurrence of a time stamp.