anchor.diff:                                           (handler-case
                                              (parse-datetime it time)
                                              (local-time::invalid-time-specification () nil)))
  -                                       (getf item :end-date)))
  +                                       (getf item :local-end-date)))
                      (title (or (post-parameter-string "title")
                                 (getf item :title)))
                      (details (or (post-parameter-string "details")
  
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:           (update-timestamp-until-day)
            (update-timestamp-until-week))))
  
      (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*))))
      (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)))
  