From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id wC1fMKucRmQBfAAASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 17:13:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kPluL6ucRmThlgAAG6o9tA (envelope-from ) for ; Mon, 24 Apr 2023 17:13:47 +0200 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 68DEC3D00A for ; Mon, 24 Apr 2023 17:13:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqxsN-0007WF-1a; Mon, 24 Apr 2023 11:13:11 -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 1pqxsL-0007W6-9W for emacs-orgmode@gnu.org; Mon, 24 Apr 2023 11:13:09 -0400 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqxsI-000429-MR for emacs-orgmode@gnu.org; Mon, 24 Apr 2023 11:13:09 -0400 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4efe8991b8aso2572549e87.0 for ; Mon, 24 Apr 2023 08:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682349184; x=1684941184; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=8s/9e6UNB/SJWp5d1kedXyL52YxXzLByUmIL/Pch8LA=; b=ScFae3NZhDUy4Fa01YL+iBsMjTFBZCVPdHaDwT0EAqW2oYfiPnHWWhKLHePZstSTqi tfoix/qvg1ylQMvoBRDImo4RL5Pzaq6Uw7gr5uFqVJyu74IvNQOm/CHuVZ/RnYilsVa/ dzep84Ac4fPVQOGnXoFgZ80TOLSrvUn+AhR4B9a0TSquVcTTes70o9QUIwwFb01d4K+y u+njgb/AkhnwjcrI88f5yNKEDurKzjOL1Y6+RH8qK/KhomB3aOe2dq3djJQdEB8L3JXU xsiq7Q9morSgM8Pn6Ui2YMP39CFEPUr0ox5DOqNGB3mg/TCvcXU1yl6rbAWks9qRy2rs faIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682349184; x=1684941184; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8s/9e6UNB/SJWp5d1kedXyL52YxXzLByUmIL/Pch8LA=; b=K/BtQ3FGmOXQw6vlCTbH1Z5K0JYvxNhl/hQi8rFuNp7DRWRQ4WN+yZVH/U+1GthWS+ QoeJNFIj1tLXwNWy/7XnTzViyGd1fT0p/7v82utTiiT5iIHLXxiqhrpFISTrhmCHFEbD RCqV3bhMzOY6UsfAe+/RyKruYA5KkAQ6oeNi8yNz313fKUm+iI0ofRkAnkkkT0/9R6Jg fqgu1flieMqpWVqCYukF6Lk9RUQu7dU8qQgGwgnBZiQQQqiW3Cxd41FEP6liw12AnPds X18Ul2Vcj8G8gORDn9RnTtZpPqhgppNFC8VPuJOSDtdmxZELwT5kvMI0/u3py9ac3SzG dQjw== X-Gm-Message-State: AAQBX9drj506mDyeNGHEj4bnfOpkLpdL4XhjqE3+XkS/xVzfRxFH4hCj xcPoahXTjtxPCv2BwdR5b9fhuMnhxtg= X-Google-Smtp-Source: AKy350YJpv+9Jxu2E74SLUBL7Ljz8LEYxic5rzo5yDugyerMOJ6K4SAmzzBZdcfC6WRSXn1f1FjKZw== X-Received: by 2002:ac2:53bb:0:b0:4ec:9e01:71e with SMTP id j27-20020ac253bb000000b004ec9e01071emr3234326lfh.4.1682349184198; Mon, 24 Apr 2023 08:13:04 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id i14-20020a2e864e000000b002a9f9c358d4sm1551587ljj.111.2023.04.24.08.13.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Apr 2023 08:13:03 -0700 (PDT) Message-ID: Date: Mon, 24 Apr 2023 22:13:01 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: What is a week? Content-Language: en-US To: Marcin Borkowski , emacs-orgmode@gnu.org References: <87h6to1ka7.fsf@mbork.pl> <87r0sa32hy.fsf@localhost> <874jp6beqj.fsf@mbork.pl> From: Max Nikulin Mail-Followup-To: Marcin Borkowski , emacs-orgmode@gnu.org In-Reply-To: <874jp6beqj.fsf@mbork.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=manikulin@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.194, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682349227; a=rsa-sha256; cv=none; b=SMYOj+0nPZe4nDYNjpOMoUc9dmzfp3/DbZ6CtpIz8DpqEve6cONEW+0JBrTrLNqBYLbCR8 Nhe0XYe/82R925QCJsxZTjL91kc0J7YpszyNzhFNRqQ/iro6TmJNPmHKFcl2/bnOeRXNw3 hyRHgCn3UhLp6H2/zQ4PfToBguQJblyuYVK74cwgqvsVqP0Hr5y/YWB2Vq9RsP16Fg7vfc BbHjVCYfqYhTVGtfMrF5Yfy2IMUkoV/N1stEt0cYjzYIxLcovF8AiZZxxYMYJawAXGO+GS gKznJ8kCgSmKZepDqg647bQUn/oKVH7FqN+kcGFJws3EINNfauHVdaL/yVyvgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=ScFae3NZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682349227; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8s/9e6UNB/SJWp5d1kedXyL52YxXzLByUmIL/Pch8LA=; b=hkjQcvxCh27di7FqGlX5QWS2B8jx4rB2gnhQatrPp4nIeLQgUeZDYvJLvASSa56fXgBadz DCSwiljsYDcgW10p5wkcIJ2B9KSezccVICoyF81S0nuGqfd4NYMm0mXovXX7ls5xICd5dl sl/YrcL0kJ53o+Xi1G3FgxQUJbU7aeqEJ/3q18Ko8KucO/I83IO3Sum2VMdVJ54FqsqzAt dyyNoCrCuUbemDZF6YYYHl1siW8m1BlhwqjBb9QuD5eAeX2mg3QXM6N1ZMlrM6GxJZ97RR NxS6KiW/qikwNelq6EqYl7oBiYufeD+Z+Bx0UqcWCnfsN2/rwTE7l6meGEgFqQ== X-Migadu-Spam-Score: 0.89 X-Spam-Score: 0.89 X-Migadu-Queue-Id: 68DEC3D00A X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=ScFae3NZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-TUID: bMNOpdeNN1jQ On 24/04/2023 02:06, Marcin Borkowski wrote: > > Fair enough. Still, I consider this a bug in the docs (they don't say > clearly to set :wstart 7)... I do not think :wstart 7 gives expected result when run on any day other than Sunday. Current expression shifts interval start into future, see the last column #+begin_src elisp (let ((dow-seq (number-sequence 0 6)) (wstart-seq (number-sequence 0 7)) (shift 0) (diff (lambda (dow ws) ; taken from org-clock.el: (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws)))))) (cons (cons "dow\\wstart" wstart-seq) (mapcar (lambda (dow) (cons dow (mapcar (lambda (ws) (funcall diff dow ws)) wstart-seq))) dow-seq))) #+end_src #+RESULTS: | dow\wstart | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 0 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | 1 | 1 | 0 | -1 | -2 | -3 | -4 | -5 | -6 | | 2 | 2 | 1 | 0 | -1 | -2 | -3 | -4 | -5 | | 3 | 3 | 2 | 1 | 0 | -1 | -2 | -3 | -4 | | 4 | 4 | 3 | 2 | 1 | 0 | -1 | -2 | -3 | | 5 | 5 | 4 | 3 | 2 | 1 | 0 | -1 | -2 | | 6 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | -1 | My expectation is values like in column "1" with appropriate cyclic shift.