From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: The format of time values in lisp/calendar/time-date.el. Date: Mon, 14 Mar 2005 15:51:35 +0100 Message-ID: <873buy7020.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110813660 20512 80.91.229.2 (14 Mar 2005 15:21:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 15:21:00 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 14 16:21:00 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DArFP-0004q9-IT for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 16:12:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DArV5-00081q-T6 for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 10:28:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DArSB-0006sp-6V for emacs-devel@gnu.org; Mon, 14 Mar 2005 10:25:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DArMG-0005Vf-5t for emacs-devel@gnu.org; Mon, 14 Mar 2005 10:19:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DArMD-0005Rq-TD for emacs-devel@gnu.org; Mon, 14 Mar 2005 10:19:49 -0500 Original-Received: from [194.109.24.26] (helo=smtp-vbr6.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DAqup-0001jX-Bp for emacs-devel@gnu.org; Mon, 14 Mar 2005 09:51:31 -0500 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr6.xs4all.nl (8.12.11/8.12.11) with ESMTP id j2EEpUCM056985 for ; Mon, 14 Mar 2005 15:51:30 +0100 (CET) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DAqut-0006RY-00 for ; Mon, 14 Mar 2005 15:51:35 +0100 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 35 X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34575 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34575 The various function in time-date.el seem to use different formats for their arguments. According to the node Time Calculations in the Lisp Manual, the following functions should use the format (HIGH LOW MICRO) to specify HIGH * 65536 + LOW + MICRO / 1000000 seconds: - time-less-p - time-subtract - time-add - time-to-days - time-to-day-in-year However, in reality: - time-less-p expects (HIGH LOW) for its arguments - time-subtract expects (HIGH LOW) for its arguments and returns (HIGH LOW) as well - time-add expects either (HIGH LOW MICRO), (HIGH LOW), or (HIGH . LOW) and returns (HIGH LOW MICRO). - time-to-days and time-to-day-in-year use decode-time on its argument. decode-time expects (HIGH LOW . IGNORED) or (HIGH . LOW). Was there an evolution in format from (HIGH . LOW), via (HIGH LOW), to (HIGH LOW MICRO)? Shall I fix time-less-p and time-subtract to deal with (HIGH LOW MICRO) arguments as well? Should they deal with (HIGH . LOW) too? What about the return value of time-subtract (and time-add): should it be backward compatible in the sense that it returns (HIGH LOW) if both its arguments are of that format? Lute.