diff options
author | Sacha Chua <sacha@sachachua.com> | 2023-09-26 12:59:10 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2023-09-26 12:59:10 -0400 |
commit | 1e7f47df29053c2a197ee4a143f6ea198167b4fc (patch) | |
tree | 642f8daf5d39978ed0456b85327ed9338104b586 /emacsconf-schedule.el | |
parent | 79a4998759f552f6fd2872f57860ff59cc9d6c07 (diff) | |
download | emacsconf-el-1e7f47df29053c2a197ee4a143f6ea198167b4fc.tar.xz emacsconf-el-1e7f47df29053c2a197ee4a143f6ea198167b4fc.zip |
Recognize multiple time constraints
Diffstat (limited to 'emacsconf-schedule.el')
-rw-r--r-- | emacsconf-schedule.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el index 644d818..885cada 100644 --- a/emacsconf-schedule.el +++ b/emacsconf-schedule.el @@ -642,11 +642,17 @@ Both start and end time are tested." (defun emacsconf-schedule-get-time-constraint (o) (unless (string-match "after the event" (or (plist-get o :q-and-a) "")) (let ((avail (or (plist-get o :availability) "")) - hours) - (when (string-match "\\([<>]\\)=? *\\([0-9]+:[0-9]+\\) *EST" avail) - (if (string= (match-string 1 avail) ">") - (list (match-string 2 avail) nil) - (list nil (match-string 2 avail))))))) + hours + start + (pos 0) + (result (list nil nil))) + (while (string-match "\\([<>]\\)=? *\\([0-9]+:[0-9]+\\) *EST" avail pos) + (setf (elt result (if (string= (match-string 1 avail) ">") + 0 + 1)) + (match-string 2 avail)) + (setq pos (match-end 0))) + result))) (defun emacsconf-schedule-validate-all-talks-present (sched &optional list) (let* ((sched-slugs (mapcar (lambda (o) (plist-get o :slug)) |