Function: org-2ft

org-2ft is a byte-compiled function defined in org-macs.el.

Signature

(org-2ft S)

Documentation

Convert S to a floating point time.

If S is already a number, just return it. If it is a string, parse it as a time string and apply float-time to it. If S is nil, just return 0.

Source Code

;; Defined in ~/.emacs.d/elpa/org-9.8.2/org-macs.el
;;; Time

(defun org-2ft (s)
  "Convert S to a floating point time.
If S is already a number, just return it.  If it is a string,
parse it as a time string and apply `float-time' to it.  If S is
nil, just return 0."
  (cond
   ((numberp s) s)
   ((stringp s)
    (condition-case nil
	(org-time-string-to-seconds s)
      (error 0)))
   (t 0)))