From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qD07DOuKM2TlEgAASxT56A (envelope-from ) for ; Mon, 10 Apr 2023 06:04:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oERBDOuKM2RVmQAA9RJhRA (envelope-from ) for ; Mon, 10 Apr 2023 06:04:59 +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 C20E632B71 for ; Mon, 10 Apr 2023 06:04:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plilI-0000le-Op; Mon, 10 Apr 2023 00:04:12 -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 1plil7-0000lJ-M6 for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 00:04:01 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plil5-0003e0-Nu for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 00:04:01 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 62F3222715A5 for ; Mon, 10 Apr 2023 06:03:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eeXDp6WXN34P for ; Mon, 10 Apr 2023 06:03:53 +0200 (CEST) Received: from localhost (178235147195.dynamic-3-poz-k-0-1-0.vectranet.pl [178.235.147.195]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 33E8C16788EA for ; Mon, 10 Apr 2023 06:03:53 +0200 (CEST) References: <87h6to1ka7.fsf@mbork.pl> User-agent: mu4e 1.1.0; emacs 30.0.50 From: Marcin Borkowski To: Org-Mode mailing list Subject: Re: What is a week? In-reply-to: <87h6to1ka7.fsf@mbork.pl> Date: Mon, 10 Apr 2023 06:03:48 +0200 Message-ID: <87fs981izf.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=195.110.48.8; envelope-from=mbork@mbork.pl; helo=mail.mojserwer.eu X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681099499; a=rsa-sha256; cv=none; b=TqzxeR/bJCOc25GecEYTm3dCeXZxtVuJis8y5s/Py5v5JiKDHAhInx7OUf5OxByLiUTj2r Hl46aNMHlEdhDD3qTekN9xB1Hhu8zh2DmXl0WVZTLaMMQz4HQgvcdAk29ifjJM6VSgYQ7Y oRJ3AFPvEsJNhPPRQRYmFN0LrjBvO4ibo7auloLtwY0l20wdSOjTV6Rcg1aL5qqCFHsnOU XAGpWKOnu7BRsotRYL0HHEgoSi9Txp0Ltqpa7d/Haad38HAKX7WD8wsJzJRe2GUsMlfOVy 4xF5L0sabIgprynCGAluZXxSGYWS5dV7hJmZY1EoUkB6wD9/1Ir/0B+1SzDYDQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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=1681099499; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=zFLvlS+cmQyHirPDGLL9AbcEnMrm2ryiTWjEBI0hY+8=; b=e9peUGmkfuTAshgij58GYgAp6JGrfS+98LJKah90jYPrLX1kzRkOa5YwrsVEsO6MB7OSpt k55kwyqQ91xL3r4IrSkdKmtLmHtOGJfZdFduXnHdSNYCRrL4MInyYaLuygLdg4CuHgrHkb zK69Z98sTJwAMVbzGZV41OifkToMPiFJxNSDPhumpZXzwzvYfCnMIxxgiFf+TMylNQkafE N7ADc3pIXkexfSUtSPc8aaFmWNom+Pohx7xzRnhLlcnr2iibCXxuCsyMMU26TaktqLQlfd 2KSm9vLDwafwq0StwArvYn8QQrnFlUvtzqOOd+Jy0PyVYfPGb6N+z3gu/UvZ/A== X-Migadu-Spam-Score: -2.12 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Spam-Score: -2.12 X-Migadu-Queue-Id: C20E632B71 X-TUID: UxQA3Tqs8uRJ On 2023-04-10, at 05:35, Marcin Borkowski wrote: > Hi fellow Orgers, > > I'm trying to wrap my head around the notion of the week, for the > purpose of using weekly clock tables. > > Assume it's Sunday. I create a clock table with :wstart 0 and > thisweek - and apparently my clock table starts 7 days ago. > > Now it's Monday. I create a clock table with :wstart 1 and thisweek - > and my clock table starts today. > > What is the logic behind it? To clarify: I understand that the reason is the `if' from this line from `org-clock.el': (setq diff (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws))) (introduced ~10 years ago!). But why is it coded this way? Best, -- Marcin Borkowski http://mbork.pl