anchor.diff:  (in-package #:cl-strftime)
  +
  +(deftype index () '#.`(integer 0 ,array-dimension-limit))
   
   (defun expand-tz (tz)
     (etypecase tz
  
positive.code:    :single-line-mode t
     :case-insensitive-mode nil))
  
  (defun compile-flag (flag width action)
    (declare (function action))
    (case flag
      ;; Do not pad.
      (#\-
       (writer (s ts)
         (format s "~A" (funcall action ts))))
      ;; Pad with spaces.
      (#\_
       (writer (s ts)
         (format s "~V,VD" width #\Space (funcall action ts))))
      ;; Pad with zeros.
      (#\0
       (writer (s ts)
         (format s "~V,VD"
                 width #\0
                 (funcall action ts))))
      ;; Toggle case.
      (#\#
       (writer (s ts)
         (let ((value (funcall action ts)))
           (format s "~A"
                   (if (stringp value)
                       (toggle-case value)
                       value)))))
      ;; Upcase.
      (#\^
       (writer (s ts)
         (format s "~:@(~A~)"
                 (funcall action ts))))
      (t
       (writer (s ts)
         (format s "~A" (funcall action ts))))))
  
  (defun compile-directive (flag width directive)
    (multiple-value-bind (action default-flag default-width)
        (find-directive (character directive))
      (let ((flag (or flag default-flag))
            (width (or width default-width)))
  
negative.code:                                            &optional time tz
                                             &environment env)
    (if (constantp format env)
        `(format-time ,stream (load-time-value (make-time-formatter ,format))
                      ,@(when time (list time)) ,@(when tz (list tz)))
        decline))
  
  (defun flatten! (list)
    (declare (optimize speed))
    (labels ((flatten! (list)
               (mapcan
                (lambda (elt)
                  (if (atom elt)
                      (list elt)
                      (flatten! elt)))
                list)))
      (flatten! list)))
  
  (defvar *compiled-time-formats* (make-hash-table))
  
  (defun make-time-formatter-1 (format force-gmt)
    (let ((writers (nreverse (flatten! (compile-formatter format)))))
      (declare (optimize speed))
      (lambda (stream &key (time (now)))
        (let ((*default-timezone* (if force-gmt +utc-zone+ *default-timezone*)))
          (flet ((call/stream (stream)
                   (dolist (writer writers)
                     (declare (function writer) (optimize speed))
                     (funcall writer stream time))))
            (declare (inline call/stream))
            (if (streamp stream)
                (call/stream stream)
  