@cindex Julian day numbers
@cindex astronomical day numbers
Astronomers use a simple counting of days elapsed since noon, Monday,
-January 1, 4713 B.C. on the Julian calendar. The number of days elapsed
+January 1, 4713 BC on the Julian calendar. The number of days elapsed
is called the @dfn{Julian day number} or the @dfn{Astronomical day number}.
@cindex Hebrew calendar
Calendrical conversion functions always use the Gregorian calendar, even
for dates before the Gregorian calendar was introduced. Year numbers
-count the number of years since the year 1 B.C., and do not skip zero
+count the number of years since the year 1 BC, and do not skip zero
as traditional Gregorian years do; for example, the year number
-@minus{}37 represents the Gregorian year 38 B.C@.
+@minus{}37 represents the Gregorian year 38 BC@.
@defun time-convert time &optional form
This function converts a time value into a Lisp timestamp.
@code{905595714.0}, @code{905595714}.
@item days
-An integer number representing the number of days since 00000101. For
-instance: @code{729644}.
+An integer number representing the number of days since Sunday,
+December 31, 1 BC (Gregorian). For instance: @code{729644}.
@item decoded time
A list of decoded time. For instance: @code{(54 21 12 12 9 1998 6 nil
;;; These versions are rewritten to use arbitrary-size integers.
;;; A numerical date is the number of days since midnight on
-;;; the morning of December 31, 1 B.C. (Gregorian) or January 2, 1 A.D. (Julian).
+;;; the morning of December 31, 1 BC (Gregorian) or January 2, 1 AD (Julian).
;;; Emacs's calendar refers to such a date as an absolute date, some Calc function
;;; names also use that terminology. If the date is a non-integer, it represents
;;; a specific date and time.
;;;###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
;;;###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
\(or less than 61 if the operating system supports leap seconds).
MINUTE is an integer between 0 and 59. HOUR is an integer
between 0 and 23. DAY is an integer between 1 and 31. MONTH is an
-integer between 1 and 12. YEAR is an integer indicating the
-four-digit year. DOW is the day of week, an integer between 0 and 6,
+integer between 1 and 12. YEAR is the year number, an integer; 0
+represents 1 BC. DOW is the day of week, an integer between 0 and 6,
where 0 is Sunday. DST is t if daylight saving time is in effect,
nil if it is not in effect, and -1 if daylight saving information is
not available. UTCOFF is an integer indicating the UTC offset in