]> code.delx.au - gnu-emacs/commitdiff
parse-times-string doc string clarification
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 25 Mar 2016 15:32:39 +0000 (16:32 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 25 Mar 2016 15:32:39 +0000 (16:32 +0100)
* lisp/calendar/parse-time.el (parse-time-string): Note that
we accept RFC2822 strings.

lisp/calendar/parse-time.el

index c17d04a8c10acadc68a94218920f86c0ab7e0ed0..b62f9fa79418c942dc257cca2c656477143931d8 100644 (file)
@@ -146,8 +146,12 @@ letters, digits, plus or minus signs or colons."
 ;;;###autoload
 (defun parse-time-string (string)
   "Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ).
-The values are identical to those of `decode-time', but any values that are
-unknown are returned as nil."
+STRING should be on something resembling an RFC2822 string, a la
+\"Fri, 25 Mar 2016 16:24:56 +0100\", but this function is
+somewhat liberal in what format it accepts, and will attempt to
+return a \"likely\" value even for somewhat malformed strings.
+The values returned are identical to those of `decode-time', but
+any values that are unknown are returned as nil."
   (let ((time (list nil nil nil nil nil nil nil nil nil))
        (temp (parse-time-tokenize (downcase string))))
     (while temp