Re: [calsify] Subtraction vs. DST disambiguation

Michael H Deckers <michael.h.deckers@googlemail.com> Sat, 03 October 2020 13:58 UTC

Return-Path: <michael.h.deckers@googlemail.com>
X-Original-To: calsify@ietfa.amsl.com
Delivered-To: calsify@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2606A3A0AB1 for <calsify@ietfa.amsl.com>; Sat, 3 Oct 2020 06:58:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.311
X-Spam-Level:
X-Spam-Status: No, score=-2.311 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.213, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com
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 G8MHIzOoErJ5 for <calsify@ietfa.amsl.com>; Sat, 3 Oct 2020 06:58:42 -0700 (PDT)
Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B4AC03A0A8D for <calsify@ietf.org>; Sat, 3 Oct 2020 06:58:41 -0700 (PDT)
Received: by mail-ej1-x636.google.com with SMTP id lw21so1562768ejb.6 for <calsify@ietf.org>; Sat, 03 Oct 2020 06:58:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=OTWmD2iMEc3bG9bCzY96yUtFudTWdKRite6UBJYbDnE=; b=neXqCjGp7/iwJAPjDnOGMGoJYAEH3RNOrUTVNGggavG4hAOp+KaQestR2ZTc73HXnD OIj2kKfSEhpsCYZeoSgFskoOE6Jbi5N/TDyb11Bt4NG3X/aPcxw0LFxDPot5bCXu/JaH sR1aMYjWmAonmXG0sEvNhOxMFodHIRTq4doOK6FaoIjcFxRq+IenY4A7y8rHd94PpP4K mPCILXHlv85A81/D+BHmSQZZyQwC6D8u8+3K3iZHmZRVgmCGIxYUTIHGOg0hlRXr+pTy rBOD1QiAoScsqQoIDeDOcdcJzzBjWiWtyMvZfoE0covGyWvCV9WvbsVcnoKl2VlDDiMS RqaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=OTWmD2iMEc3bG9bCzY96yUtFudTWdKRite6UBJYbDnE=; b=bVIG5bk+HRr5oxRGpCdZ18qW2w0ouCIU2opIpgzgnEv4PN5DKl4LwUsrYdJEmQu1l+ zTFX8x+GAS3qco3+czCUpdXF7JeBkoHm5yl0GAdL1NxXfH6DWwrLca2ZnezNzi84uT+E SV8t5HRwKGJxFBwMqhuA7FIhr3W3YaC5zmMsIR8yzSIW35apL5GeC7dKf6UEqMBy0T+D cNPZPdHq2SPUh+XemFyeJdxsMkkQ4JtkuqFNR1gOUStnWBZkaHxFuLuwV0cm6JlHXMkm +LcjdWPPV0F81k+fQm0PSk6xuYdEmFLv/2e9CDk0auO3V72TSpxcVmyrq41m4Q99UPSy 0AxQ==
X-Gm-Message-State: AOAM532AKgk18zJiZhZKes4wBqQ9wtigQ2WXPEUqyDj05XNSyhUb+Kef qZ520j06vxPC/UGWsGCBzdfQMZ+WyOq4Aw==
X-Google-Smtp-Source: ABdhPJwU/brXDyEmpP8y3+zm1H/JIdHS4MtYGaWFb28K0JEdI8BtUKnfe2pFtKinojTWU1s371uCig==
X-Received: by 2002:a17:906:a282:: with SMTP id i2mr6628114ejz.39.1601733519842; Sat, 03 Oct 2020 06:58:39 -0700 (PDT)
Received: from [192.168.178.24] (ppp-46-244-251-80.dynamic.mnet-online.de. [46.244.251.80]) by smtp.gmail.com with ESMTPSA id b6sm4259227edu.21.2020.10.03.06.58.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Oct 2020 06:58:39 -0700 (PDT)
From: Michael H Deckers <michael.h.deckers@googlemail.com>
X-Google-Original-From: Michael H Deckers <Michael.H.Deckers@googlemail.com>
To: Justin Grant <justingrant.ietf.public@gmail.com>, calsify@ietf.org
References: <CACy7CfgLvQN=B0_+quGbFLLDNupraSuvxk9a++Y4LUDc_V2nkA@mail.gmail.com>
Message-ID: <26802c87-aa05-ca16-8ead-6e19c2006909@googlemail.com>
Date: Sat, 03 Oct 2020 13:57:56 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0
MIME-Version: 1.0
In-Reply-To: <CACy7CfgLvQN=B0_+quGbFLLDNupraSuvxk9a++Y4LUDc_V2nkA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/calsify/zAhKUmlBL7q4VoGyrsq2rEKqqx4>
Subject: Re: [calsify] Subtraction vs. DST disambiguation
X-BeenThere: calsify@ietf.org
X-Mailman-Version: 2.1.29
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: <https://mailarchive.ietf.org/arch/browse/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: Sat, 03 Oct 2020 13:58:43 -0000

    On 2020-09-30 21:50, Justin Grant wrote:

> We previously
> agreed that, in order to make subtraction reversible with subsequent
> addition of the same value, we'd reverse the order of operations so with
> subtraction of a positive duration (or adding a negative duration) the time
> portion would be subtracted first, and then the date portion.



     If I understand you correctly, you want to ensure that
          ( Δ - 1 month) + 1 month = Δ
     for any date Δ.

     This is impossible to achieve with the "usual" expectations,
     for instance, that ( Δ - 1 month) is a date in February
     when Δ is a date in March (because you have only 28 or 29
     different dates in February, but 31 dates in March, so that
     such a subtraction of 1 month from dates in March can never
     be injective).

     Of course, there are group operations on the set of dates,
     such as adding and subtracting integral multiples of days
     or weeks.

     And on the set of datetimes (= date plus time of day), there
     are group operations with multiples of formal time units such as
     months so that the subtraction of 1 month maps the set of
     datetimes in the interval
         [2020-03-01T00:00:00..2020-04-01T00:00:00]
     bijectively onto the interval
         [2020-02-01T00:00:00..2020-03-01T00:00:00]
     (eg, as in the subtraction of fractions of months in Oracle SQL);
     but the result of such a subtraction from a date (with time of day
     00:00:00) is in general no longer a date. Do you intend to
     specify such an operation?

     HTH.

     Michael Deckers.