From 21c7ef743b52fd3b30c8f4320b2120c4b39b4d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 14 Feb 2020 00:20:44 +0100 Subject: Months once again start on the first. --- module/srfi/srfi-19/alt.scm | 2 +- module/srfi/srfi-19/alt/util.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/srfi/srfi-19/alt.scm b/module/srfi/srfi-19/alt.scm index 33a1bc1f..c07bcbd8 100644 --- a/module/srfi/srfi-19/alt.scm +++ b/module/srfi/srfi-19/alt.scm @@ -282,7 +282,7 @@ (define-values (days-fixed change*) (let loop ((target base) (change change)) ;; (format (current-error-port) "1 ~s : ~s~%" target change) - (if (> (days-in-month target) (+ (day change) (day target))) + (if (>= (days-in-month target) (+ (day change) (day target))) ;; No date overflow, just add the change (values (set-> target (day = (+ (day change)))) (set-> change (day 0))) diff --git a/module/srfi/srfi-19/alt/util.scm b/module/srfi/srfi-19/alt/util.scm index e81baa26..2c3be65e 100644 --- a/module/srfi/srfi-19/alt/util.scm +++ b/module/srfi/srfi-19/alt/util.scm @@ -7,7 +7,7 @@ ) (define-public (start-of-month date) - (set (day date) 0)) + (set (day date) 1)) (define-public (parse-freeform-date str) -- cgit v1.2.3