From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 12 15:35:40 2024 Received: (at submit) by debbugs.gnu.org; 12 Dec 2024 20:35:41 +0000 Received: from localhost ([127.0.0.1]:40540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLpuO-0007lK-7v for submit@debbugs.gnu.org; Thu, 12 Dec 2024 15:35:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:47336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tLpuM-0007lB-4x for submit@debbugs.gnu.org; Thu, 12 Dec 2024 15:35:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tLpuE-0006D5-Nl for bug-guile@gnu.org; Thu, 12 Dec 2024 15:35:30 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1tLpu6-00065S-3b for bug-guile@gnu.org; Thu, 12 Dec 2024 15:35:30 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id E2E7D35C015; Thu, 12 Dec 2024 20:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734035717; bh=Qi0swqQ/Y36Vnf7YriH4j0ePAJYHoUjoGVDlmP0UVZ8=; h=From:To:Cc:Subject:Date; b=nsXDjP0rpujbrGQxG7hkx0QWV9/qTs52DPnWxIZCoqeeuC1jmlCn8hcibQtwVtGGm CJ0Nen/qTwNfJstEKpiTHr1yivKCwoqYIL/0o88JeLu3P5kAUSnEPVveZrX55LYAJZ Sze05bUUvlBX2q/7RTEctQyKs4Pcx3fTkkB7kC06Q84FKQyl52EqpmIEA2Mr1WBd9u /PP8O8EoevxrhWJg5VVrgYpG2XB3/c1buw0X/DDbTRQzEWJSc4CWftpJndKH9AKCGM oZX1O3bS4FR91Mf4vjQG76MaZ1BL2f7GwtS/IX/rpYj3GmI/IxbTxpeLqBbog5jR/R hn87wfGAZ4tE2qWrnaLG6T4FFzRxjwG9OeL8wnKZf/qvZ64pcYZsCXWtAfAwunzKrr 4rzg5SpLhCXJH5W6EQBBDaONIl9f1L17HtrpEDeKMjdr/5fZqc5748hkaTBkv9iZSh 2unsveanptimRcUHw513wUfgF/viRGgNd30Y1AFFt8j8Fr4x9PvGFfDlutpxRJxwBL teExtaCP4XBSS0oSo8D+Jgq+FyGuRuamdqXziutavS5bXl/SG2OnMfyxcGUok4E/2c Uxkn+V+pLwf5g1nHVR3vkMuIabIlegvhxCo0h2MwriDRh2UyYOHFFDtFeBZwIFJamB U0hPrz6papHV2eITrtZpB5C8= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 17C5735BC1B; Thu, 12 Dec 2024 20:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1734035717; bh=Qi0swqQ/Y36Vnf7YriH4j0ePAJYHoUjoGVDlmP0UVZ8=; h=From:To:Cc:Subject:Date; b=nsXDjP0rpujbrGQxG7hkx0QWV9/qTs52DPnWxIZCoqeeuC1jmlCn8hcibQtwVtGGm CJ0Nen/qTwNfJstEKpiTHr1yivKCwoqYIL/0o88JeLu3P5kAUSnEPVveZrX55LYAJZ Sze05bUUvlBX2q/7RTEctQyKs4Pcx3fTkkB7kC06Q84FKQyl52EqpmIEA2Mr1WBd9u /PP8O8EoevxrhWJg5VVrgYpG2XB3/c1buw0X/DDbTRQzEWJSc4CWftpJndKH9AKCGM oZX1O3bS4FR91Mf4vjQG76MaZ1BL2f7GwtS/IX/rpYj3GmI/IxbTxpeLqBbog5jR/R hn87wfGAZ4tE2qWrnaLG6T4FFzRxjwG9OeL8wnKZf/qvZ64pcYZsCXWtAfAwunzKrr 4rzg5SpLhCXJH5W6EQBBDaONIl9f1L17HtrpEDeKMjdr/5fZqc5748hkaTBkv9iZSh 2unsveanptimRcUHw513wUfgF/viRGgNd30Y1AFFt8j8Fr4x9PvGFfDlutpxRJxwBL teExtaCP4XBSS0oSo8D+Jgq+FyGuRuamdqXziutavS5bXl/SG2OnMfyxcGUok4E/2c Uxkn+V+pLwf5g1nHVR3vkMuIabIlegvhxCo0h2MwriDRh2UyYOHFFDtFeBZwIFJamB U0hPrz6papHV2eITrtZpB5C8= From: Tomas Volf <~@wolfsden.cz> To: bug-guile@gnu.org Subject: [PATCH] doc: srfi-19: Use `day' instead of `date' for `make-date'. Date: Thu, 12 Dec 2024 21:35:00 +0100 Message-ID: <20241212203459.27551-2-~@wolfsden.cz> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Looking at the SRFI-19 specification, the argument is called `day', not `date'. Even the accessor is called `date-day'. So adjust the documentation to match. Also adjust the (web http) module, which was using `date' as well. * doc/ref/srfi-modules.texi (SRFI-19 Date): Use `day' instead of `date'. * module/web/http.scm (parse-rfc-822-date, parse-rfc-850-date) (parse-asctime-date): Same. --- doc/ref/srfi-modules.texi | 2 +- module/web/http.scm | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/ref/srfi-modules.texi b/doc/ref/srfi-modules.texi index 4ccc27a7b..edfeca313 100644 --- a/doc/ref/srfi-modules.texi +++ b/doc/ref/srfi-modules.texi @@ -2661,7 +2661,7 @@ each context, and apply non-SRFI-19 facilities to convert where necessary. Return @code{#t} if @var{obj} is a date object, or @code{#f} if not. @end defun -@defun make-date nsecs seconds minutes hours date month year zone-offset +@defun make-date nsecs seconds minutes hours day month year zone-offset Create a new date object. @c @c FIXME: What can we say about the ranges of the values. The diff --git a/module/web/http.scm b/module/web/http.scm index 24a4312b5..b65fa91c1 100644 --- a/module/web/http.scm +++ b/module/web/http.scm @@ -742,40 +742,40 @@ as an ordered alist." (define (parse-rfc-822-date str space zone-offset) ;; We could verify the day of the week but we don't. (cond ((string-match? (substring str 0 space) "aaa, dd aaa dddd dd:dd:dd") - (let ((date (parse-non-negative-integer str 5 7)) + (let ((day (parse-non-negative-integer str 5 7)) (month (parse-month str 8 11)) (year (parse-non-negative-integer str 12 16)) (hour (parse-non-negative-integer str 17 19)) (minute (parse-non-negative-integer str 20 22)) (second (parse-non-negative-integer str 23 25))) - (make-date 0 second minute hour date month year zone-offset))) + (make-date 0 second minute hour day month year zone-offset))) ((string-match? (substring str 0 space) "aaa, d aaa dddd dd:dd:dd") - (let ((date (parse-non-negative-integer str 5 6)) + (let ((day (parse-non-negative-integer str 5 6)) (month (parse-month str 7 10)) (year (parse-non-negative-integer str 11 15)) (hour (parse-non-negative-integer str 16 18)) (minute (parse-non-negative-integer str 19 21)) (second (parse-non-negative-integer str 22 24))) - (make-date 0 second minute hour date month year zone-offset))) + (make-date 0 second minute hour day month year zone-offset))) ;; The next two clauses match dates that have a space instead of ;; a leading zero for hours, like " 8:49:37". ((string-match? (substring str 0 space) "aaa, dd aaa dddd d:dd:dd") - (let ((date (parse-non-negative-integer str 5 7)) + (let ((day (parse-non-negative-integer str 5 7)) (month (parse-month str 8 11)) (year (parse-non-negative-integer str 12 16)) (hour (parse-non-negative-integer str 18 19)) (minute (parse-non-negative-integer str 20 22)) (second (parse-non-negative-integer str 23 25))) - (make-date 0 second minute hour date month year zone-offset))) + (make-date 0 second minute hour day month year zone-offset))) ((string-match? (substring str 0 space) "aaa, d aaa dddd d:dd:dd") - (let ((date (parse-non-negative-integer str 5 6)) + (let ((day (parse-non-negative-integer str 5 6)) (month (parse-month str 7 10)) (year (parse-non-negative-integer str 11 15)) (hour (parse-non-negative-integer str 17 18)) (minute (parse-non-negative-integer str 19 21)) (second (parse-non-negative-integer str 22 24))) - (make-date 0 second minute hour date month year zone-offset))) + (make-date 0 second minute hour day month year zone-offset))) (else (bad-header 'date str) ; prevent tail call @@ -790,13 +790,13 @@ as an ordered alist." (let ((tail (substring str (1+ comma) space))) (unless (string-match? tail " dd-aaa-dd dd:dd:dd") (bad-header 'date str)) - (let ((date (parse-non-negative-integer tail 1 3)) + (let ((day (parse-non-negative-integer tail 1 3)) (month (parse-month tail 4 7)) (year (parse-non-negative-integer tail 8 10)) (hour (parse-non-negative-integer tail 11 13)) (minute (parse-non-negative-integer tail 14 16)) (second (parse-non-negative-integer tail 17 19))) - (make-date 0 second minute hour date month + (make-date 0 second minute hour day month (let* ((now (date-year (current-date))) (then (+ now year (- (modulo now 100))))) (cond ((< (+ then 50) now) (+ then 100)) @@ -811,7 +811,7 @@ as an ordered alist." (define (parse-asctime-date str) (unless (string-match? str "aaa aaa .d dd:dd:dd dddd") (bad-header 'date str)) - (let ((date (parse-non-negative-integer + (let ((day (parse-non-negative-integer str (if (eqv? (string-ref str 8) #\space) 9 8) 10)) @@ -820,7 +820,7 @@ as an ordered alist." (hour (parse-non-negative-integer str 11 13)) (minute (parse-non-negative-integer str 14 16)) (second (parse-non-negative-integer str 17 19))) - (make-date 0 second minute hour date month year 0))) + (make-date 0 second minute hour day month year 0))) ;; Convert all date values to GMT time zone, as per RFC 2616 appendix C. (define (normalize-date date) -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 22 16:36:26 2024 Received: (at 74840-done) by debbugs.gnu.org; 22 Dec 2024 21:36:26 +0000 Received: from localhost ([127.0.0.1]:52217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPTcg-0002qz-HU for submit@debbugs.gnu.org; Sun, 22 Dec 2024 16:36:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPTce-0002qj-Be for 74840-done@debbugs.gnu.org; Sun, 22 Dec 2024 16:36:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPTcX-0008Tz-JD; Sun, 22 Dec 2024 16:36:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=SPpqUVYwHc//L/uZF0Sf+b7EYFfUodWoMr4h5FLihfI=; b=iRftLZPIEwVmUqceKARS gAryLoWEzxqVtOlud4e+RtoIYiHNY878ddmDbw3N0SRHkccRgDfL8v+g5IYw3nBIQPRIEGGC2g2bU jQxqpwUJY31CJs3F9HxSzxAIcxmm6IhG/M6GQ4NZdUZluk6oLIp38PJlXu1h1jsoHNB2sQ+JsRXRO dURG13wJjUzK58jab8S0r7MfkwWdVvuaFhKTra2wPfVtDc5Mqc4UoA/nRG6UG6bZHI+CkQJJnwSa8 dyPPg9ykFiOOnVheXYEiChiZg6OX0bC0559eZ193ayT5fdDmWVB14hrqH9aHNWl7hB5N9Trk2NuSR MiVi5WpwKJSMwA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tomas Volf <~@wolfsden.cz> Subject: Re: bug#74840: [PATCH] doc: srfi-19: Use `day' instead of `date' for `make-date'. In-Reply-To: <20241212203459.27551-2-~@wolfsden.cz> (Tomas Volf's message of "Thu, 12 Dec 2024 21:35:00 +0100") References: <20241212203459.27551-2-~@wolfsden.cz> Date: Sun, 22 Dec 2024 22:36:13 +0100 Message-ID: <87h66vfliq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74840-done Cc: 74840-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Tomas Volf <~@wolfsden.cz> skribis: > Looking at the SRFI-19 specification, the argument is called `day', not > `date'. Even the accessor is called `date-day'. So adjust the > documentation to match. > > Also adjust the (web http) module, which was using `date' as well. > > * doc/ref/srfi-modules.texi (SRFI-19 Date): Use `day' instead of `date'. > * module/web/http.scm (parse-rfc-822-date, parse-rfc-850-date) > (parse-asctime-date): Same. Applied, thanks! From unknown Sun Jun 22 08:01:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Jan 2025 12:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator