   "Format timeline of given DATE.
 DATE should be a string of the form %Y-%m-%d.  When called
 interactively, this date will be queried with `org-read-date’.
-The timeline will be formatted for this day, starting at 00:00
-and ending at 23:61.  When not given, FILES defaults to
+The timeline will be formatted for DATE starting at 00:00 and
+ending at 23:61.  When not given, FILES defaults to
 `org-agenda-files’."
   (interactive (list (org-read-date nil nil)))
   (db/org-format-timeline (concat date " 00:00")

(require 'dash)

(defun db/org-clocking-time-in-range (tstart tend)
  "Return list of all tasks in the current buffer with their
clocking times attached, provied they lie between TSTART and
TEND.  The resulting list conists of elements of the form

  (MARKER . CLOCK-TIMES)

where MARKER is a marker to the begnning of the corresponding
heading and CLOCK-TIMES consists of cons cells of the form (START
. END), where START and END are the starting and ending times of
a clock line for this task.  START and END are times as returned
by FLOAT-TIME, which see.  No truncation with respect to TSTART
and TEND is done, i.e., START or END may lie outside of these
limits, but it is always true that TSTART ≤ END ≤ TEND or
TSTART ≤ START ≤ TEND."
  ;; adapted from `org-clock-sum’
  (when (eq major-mode 'org-mode)
    (let* ((re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*"


  (START END MARKER),

where START, END, MARKER are as returned by
`db/org-clocking-time-in-range’, which see.  Entries in the
resulting list are sorted by START, ascending."
  (let (timeline-of-files turned-around-timeline)
