anchor.diff:            (update-timestamp-until-day)
             (update-timestamp-until-week))))
   
  -    (timestamp-to-universal new-timestamp)))
  +    (awhen new-timestamp (timestamp-to-universal it))))
   
   (defun update-recurring-event-time (id &optional data result-struct)
  -  (let ((result (or result-struct (gethash id *db-results*)))
  -        (new-time (next-recurring-event-time id data)))
  -    (modify-db id :auto-updated-time new-time)
  -    (with-locked-hash-table (*db-results*)
  -      (setf (result-time result) new-time))
  -    (event-index-update result)))
  +  (let ((result (or result-struct (gethash id *db-results*))))
  +    (awhen (next-recurring-event-time id data)
  +      (modify-db id :auto-updated-time it)
  +      (with-locked-hash-table (*db-results*)
  +        (setf (result-time result) it))
  +      (event-index-update result))))
   
   (defun recurring-event-schedule (id &optional data)
     (let* ((event (or data (db id)))
  
positive.code:                        (:a :style "float: right;" :href (strcat url "?p=" (+ page 1)) "next page >")))))))))))
  
  (defun populate-calendar (items &key (page 0) (count 20) paginate url (location t) (sidebar nil))
    (let ((event-list)
          )
      (dolist (item items)
        (let ((event (db (result-id item)))
              (last-occurance))
          (if (getf event :recurring)
            (dotimes (event 6) )
            (asetf event-list (sort (push (cons (result-time item) item) it)
                                    #'< :key #'car)))))
      (html
        (iter (for i from 0 to (- (+ start count) 1))
              (cond
                ((< i start)
                 (setf items (cdr items)))
  
                ((and (>= i start) items)
                 (let* ((item (car items))
                        (item-time (result-time item)))
                   (multiple-value-bind (time date)
                       (humanize-exact-time item-time)
                     (unless (string= date calendar-date)
                       (setf calendar-date date)
                       (htm (:h3 :class "event-date" (str calendar-date))))
  
                     (htm (str (event-activity-item item
                                                    :sidebar sidebar
                                                    :time time
                                                    :truncate t
                                                    :show-distance location)))))
                 (setf items (cdr items)))
  
                (t
                 (when (and sidebar
                            (> (length items) count))
                   (htm (:a :href "/events" "see more events")))
  
                 (when (and (not sidebar)
                            (< (user-distance) 100)
                            (> (user-distance) 0))
                   (htm
                     (:div :class "item small"
                      (:em "Increasing the ")(:strong "show activity within")(:em " distance may yield more results."))))
                 (finish)))
  
              (finally
                (when (and paginate (or (> page 0) (cdr items)))
                  (htm
                    (:div :class "item"
                     (when (> page 0)
                       (htm
                         (:a :href (strcat url "?p=" (- page 1)) "< previous page")))
                     "&nbsp;"
                     (when (cdr items)
                       (htm
                         (:a :style "float: right;" :href (strcat url "?p=" (+ page 1)) "next page >")))))))))))
  
  (defun local-upcoming-events (&key (page 0) (count 20) (url "/events") (paginate t) (sidebar nil))
    (with-location
  
negative.code:                             (getf event :local-time)))
           (previous-timestamp (universal-to-timestamp previous-time))
           (timestamp (universal-to-timestamp time))
           (end-timestamp (awhen (getf event :local-end-date)
                            (universal-to-timestamp it)))
           (new-timestamp)
           (new-day-of-week)
           (new-week-of-month))
  