diff options
| author | Paul Eggert | 2024-08-14 20:37:12 -0700 |
|---|---|---|
| committer | Paul Eggert | 2024-08-14 20:37:12 -0700 |
| commit | 2533a60e4256336eb30786a555a8922326c49a8a (patch) | |
| tree | 48dc83515e64ae3e6e238b72836c11ccaea075f2 | |
| parent | c0ccb18d258c3134ac46125b676b676704a3dd00 (diff) | |
| download | emacs-2533a60e4256336eb30786a555a8922326c49a8a.tar.gz emacs-2533a60e4256336eb30786a555a8922326c49a8a.zip | |
* lisp/calendar/time-date.el: Add comment.
| -rw-r--r-- | lisp/calendar/time-date.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index eca80f1e8b6..b441974b943 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el | |||
| @@ -154,6 +154,11 @@ it is assumed that PICO was omitted and should be treated as zero." | |||
| 154 | DATE should be in one of the forms recognized by `parse-time-string'. | 154 | DATE should be in one of the forms recognized by `parse-time-string'. |
| 155 | If DATE lacks timezone information, GMT is assumed." | 155 | If DATE lacks timezone information, GMT is assumed." |
| 156 | (condition-case err | 156 | (condition-case err |
| 157 | ;; Parse DATE. If it contains a year, use defaults for other components. | ||
| 158 | ;; Then encode the result; this signals an error if the year is missing, | ||
| 159 | ;; because encode-time signals if crucial time components are nil. | ||
| 160 | ;; This heuristic uses local time if the string lacks time zone info, | ||
| 161 | ;; because encode-time treats a nil time zone as local time. | ||
| 157 | (let ((parsed (parse-time-string date))) | 162 | (let ((parsed (parse-time-string date))) |
| 158 | (when (decoded-time-year parsed) | 163 | (when (decoded-time-year parsed) |
| 159 | (decoded-time-set-defaults parsed)) | 164 | (decoded-time-set-defaults parsed)) |