From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id SH+qBmNEEGZOQAEA62LTzQ:P1 (envelope-from ) for ; Fri, 05 Apr 2024 20:35:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id SH+qBmNEEGZOQAEA62LTzQ (envelope-from ) for ; Fri, 05 Apr 2024 20:35:15 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JbBTvj3v; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712342114; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hi8QxwWAW4o56nhbwyzjJ0rd4qZX0E32xBF/8bB28Wg=; b=u31qAFIqAfPkodD/zg7tL8XoUvq/hrhoWOqHigyJvHFdNKmIk1GRLFoCGRa3dac1Hdxc5X Z/oRyVMfP0fvboySun7Sh488OkYyzec7GWtbENjnS0FiHbZFEGD/jB86xNyZYu22hp51qX 7U6Ewu7z7HrkhgTFYZLhreMfGq2QKoEjTUjZHRwEoxq2VaB17ECm8e5FRkuoO77xMVQweR PRxikOBWtT5sofBo0kPIKCGsGXJCRH3ybCCDDQnI0NH45a6tzfVoCL/kO7c2096x1Sn/BY 7q62GvHdiFmwJuwYdcLF1Mf/2sxD4kju/8FKGA/8/wselhbTDUtdf8Hf1RkEYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712342114; a=rsa-sha256; cv=none; b=oM6DGOD/GVec69LbRfa9mKk+o9dpoycWqmTVdQPR9DMZGY9xpMn3t7SVrYS59/inuQEbP3 Z+gDC5zzzAgQgQvGUEuG6385ftIvZ+64YxaWPkzGG0pSXdxoAhwGzm5lGP8a9nq402bwRO XlBt+tV0sn3oXp88Ul98JeB4moQbeyYpP1o8CGbrKJbewWuUQSJ/QBkLOntFXPbF1qjwtc RHvl2E61jA5/1+b4ZVYw21n/t2PX8H7J5m2pyPywYpAw0mqAPWniVJACi9VvxDHQxdyTWx 1FEPOecusRxgrjByOaC36kPkCDjG0DQU3qdQiJhmtIfcmI/F/AKbrvQUZNyMrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JbBTvj3v; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D18001211F for ; Fri, 5 Apr 2024 20:35:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsoOU-0004Yq-GA; Fri, 05 Apr 2024 14:34:31 -0400 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 ) id 1rsoOL-0004YX-NU for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 14:34:24 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsoOJ-0007Fi-Cy for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 14:34:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F3BD2240029 for ; Fri, 5 Apr 2024 20:34:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712342057; bh=62lIDKQ6oWT/R9J7ClgzC0CeYEcWiHQXP56x+qaOvH8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=JbBTvj3v43RCGaGyoBNBQhe1Ae5yh7E+vZqeokp9HxwmBklLHkPXqR+++k/Ph1nZl kmJFhYZjJ77f6Dz/Dz0ByUF9oLxh3LJ7plzfxBU6kuwNp/6CUvndZW28f6eW6+YN8x lzfwRjkIhreziYvHu6aT1l+7ik/z5/7POtR7jeVoBR2mLylrlSEabo4Z6DFde4+f4W 7QjZMMy3PM2lGUVJOxYSLyazaCGZIj9Srea+hdc/P+SgBLWGNTkU8vwDIeScTJAkRT tcbQoIdlQ/h3SLEwce+g6nn3bw/QEf4VQMEjs06eUts5jSoNhSWuiRvkUaIQhJDu3x Zp6uJ+2tx1Bog== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VB6Zw0DbKz9rxB; Fri, 5 Apr 2024 20:34:15 +0200 (CEST) From: Ihor Radchenko To: Anton Haglund Cc: emacs-orgmode@gnu.org Subject: [POLL] Dealing with +1m/y repeaters when jumping to impossible date (should 05-31 +1m be 07-01 or 06-30?) (was: Leap-year bug with todo-cycle) In-Reply-To: References: Date: Fri, 05 Apr 2024 18:34:29 +0000 Message-ID: <87frvzodze.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.37 X-Spam-Score: -9.37 X-Migadu-Queue-Id: D18001211F X-Migadu-Scanner: mx13.migadu.com X-TUID: 2o8mpPbJ0iqh Anton Haglund writes: > I think I have discovered a possible leap-year bug in todo-cycle. > > I have a TODO-entry which looks like this: > > SCHEDULED: <2024-02-29 Thu ++1y> > > When I cycle the TODO-entry with c-c c-t it becomes > > SCHEDULED: <2025-03-01 Sat ++1y> This is expected. When we try to add 1 year to 2024-02-29, it is 2025-02-29. However, because 02-29 does not exist in 2025, we glibc takes the closest existing date and adds the difference in days: 2025-02-28 + 1d = 2025-03-01. We apply the same logic to +1m repeaters: SCHEDULED: <2024-05-31 Fri ++1m> will become SCHEDULED: <2024-07-01 Mon ++1m> since 2024-06-31 does not exist. > In my opinion it should become "2025-02-28 Fri" instead. Keeping "end of a month" being end of a month is indeed an alternative approach in such a situation. Both are possible; we just use the one that is easier to implement from technical perspective. Generally, I did see several requests to change the strategy when calculating next month/year. However, that would be a breaking change. I'd only go for it if people are strongly in favor of the change. So, changing this to a poll. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at