summaryrefslogtreecommitdiff
path: root/lisp/calendar/time-date.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-10-05 21:17:48 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-10-05 21:24:09 -0700
commitaadf72167673c8702531ba3802e3d5f137f139ba (patch)
treed34ceaa0e50954e21b7b3be970138929958839be /lisp/calendar/time-date.el
parent6b915359efc24ea1262c77b9a35725929b06b08b (diff)
downloademacs-aadf72167673c8702531ba3802e3d5f137f139ba.tar.gz
Improve documentation for year-zero issues
* doc/emacs/calendar.texi (Calendar Systems) * doc/lispref/os.texi (Time Conversion): Prefer "BC" to "B.C." since the documentation generally uses "BC". * doc/misc/emacs-mime.texi (time-date): * lisp/calendar/time-date.el (date-to-day, time-to-days): In the doc string, state the day origin more clearly, and more consistently with the rest of the documentation. * src/timefns.c (Fdecode_time): State the year origin in the doc string.
Diffstat (limited to 'lisp/calendar/time-date.el')
-rw-r--r--lisp/calendar/time-date.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 11bd469ae3b..dec153113f0 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -197,8 +197,9 @@ TIME should be either a time value or a date-time string."
;;;###autoload
(defun date-to-day (date)
- "Return the number of days between year 1 and DATE.
-DATE should be a date-time string."
+ "Return the absolute date of DATE, a date-time string.
+The absolute date is the number of days elapsed since the imaginary
+Gregorian date Sunday, December 31, 1 BC."
(time-to-days (date-to-time date)))
;;;###autoload
@@ -233,9 +234,9 @@ DATE1 and DATE2 should be date-time strings."
;;;###autoload
(defun time-to-days (time)
- "The number of days between the Gregorian date 0001-12-31bce and TIME.
-TIME should be a time value.
-The Gregorian date Sunday, December 31, 1bce is imaginary."
+ "The absolute date corresponding to TIME, a time value.
+The absolute date is the number of days elapsed since the imaginary
+Gregorian date Sunday, December 31, 1 BC."
(let* ((tim (decode-time time))
(year (decoded-time-year tim)))
(+ (time-date--day-in-year tim) ; Days this year