Re: [calsify] SKIP was Re: AD review of draft-ietf-calext-rscale-03

Cyrus Daboo <cyrus@daboo.name> Tue, 03 February 2015 14:50 UTC

Return-Path: <cyrus@daboo.name>
X-Original-To: calsify@ietfa.amsl.com
Delivered-To: calsify@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 67F111A0404 for <calsify@ietfa.amsl.com>; Tue, 3 Feb 2015 06:50:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.712
X-Spam-Level:
X-Spam-Status: No, score=-0.712 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_47=0.6, J_CHICKENPOX_48=0.6, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P3OQHGs6PUXg for <calsify@ietfa.amsl.com>; Tue, 3 Feb 2015 06:50:41 -0800 (PST)
Received: from daboo.name (daboo.name [173.13.55.49]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E98771A03A9 for <calsify@ietf.org>; Tue, 3 Feb 2015 06:50:40 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by daboo.name (Postfix) with ESMTP id EA248AC21EB; Tue, 3 Feb 2015 09:50:39 -0500 (EST)
X-Virus-Scanned: amavisd-new at example.com
Received: from daboo.name ([127.0.0.1]) by localhost (daboo.name [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZAdytu9CeJS0; Tue, 3 Feb 2015 09:50:39 -0500 (EST)
Received: from caldav.corp.apple.com (unknown [17.45.162.46]) by daboo.name (Postfix) with ESMTPSA id D05E3AC21E0; Tue, 3 Feb 2015 09:50:38 -0500 (EST)
Date: Tue, 03 Feb 2015 09:51:01 -0500
From: Cyrus Daboo <cyrus@daboo.name>
To: Barry Leiba <barryleiba@computer.org>
Message-ID: <C80A141CD062EFF630B6D2BB@caldav.corp.apple.com>
In-Reply-To: <CALaySJK3RiXXHTq9MC4nwA4c_gZzEVDoWa96MDc7Ue4yDRgbWA@mail.gmail.com>
References: <68FCD7D11F934509267D5915@cyrus.local> <CALaySJKQP9WjRQV2qrgfLiGwj-SQAUCF6RVcQuRrUYNpfqp17A@mail.gmail.com> <7FF77F2FE3390FFD1149E953@cyrus.local> <CALaySJK3RiXXHTq9MC4nwA4c_gZzEVDoWa96MDc7Ue4yDRgbWA@mail.gmail.com>
X-Mailer: Mulberry/4.1.0b1 (Mac OS X)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; size="1535"
Archived-At: <http://mailarchive.ietf.org/arch/msg/calsify/PtC5gE9oR7BVezJHJT3Rera0IgY>
Cc: Calsify <calsify@ietf.org>
Subject: Re: [calsify] SKIP was Re: AD review of draft-ietf-calext-rscale-03
X-BeenThere: calsify@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <calsify.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/calsify>, <mailto:calsify-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/calsify/>
List-Post: <mailto:calsify@ietf.org>
List-Help: <mailto:calsify-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/calsify>, <mailto:calsify-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Feb 2015 14:50:43 -0000

Hi Barry,

--On February 2, 2015 at 11:12:14 PM -0500 Barry Leiba 
<barryleiba@computer.org> wrote:

> Yes... I thought about that as I was sending the last message, but then
> figured that never happens.  But maybe it can.  I think your version
> here does cover it.

Actually I have thought some more about it too and come to a slightly 
different conclusion. I think when a SKIP=FORWARD is used with a leap 
month, the correct behavior, if the resulting date is invalid, is to keep 
the (valid) month fixed, and instead change the date to the last day of 
that month (in effect a SKIP=BACKWARD for the invalid date). I think that 
makes sense because if my birthday was the last day of a leap month I would 
probably want to celebrate on the last day of the next month, not the first 
day of the month after that. Similarly, if SKIP=BACKWARD is used with a 
leap month, then SKIP=BACKWARD should also be applied to any invalid date 
that results - the same argument for SKIP=FORWARD being relevant.

So I now have this:

1. If the date is invalid because the month is not a valid month in the
correct year, the SKIP is to the next (forward) or previous (backward)
valid month. If the resulting date is invalid (the day-of-month exceeds the 
number of days in the specified month) then adjust the day-of-month to the 
last (valid) value for that month.

2. Otherwise, if the date is invalid because the day-of-month is not valid 
for that month, the SKIP is to the next (forward) or previous (backward) 
valid day.


-- 
Cyrus Daboo