From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: The wild and weird world of Emacs Lisp date/time arithmetic Date: Thu, 17 Dec 2020 14:51:29 -0600 Message-ID: References: <87eejo1agg.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35356"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help GNU Emacs To: =?UTF-8?Q?Stefan_M=C3=B6ding?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 17 21:51:53 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kq0Fd-00094m-2I for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 21:51:53 +0100 Original-Received: from localhost ([::1]:42418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kq0Fc-0005nu-4Y for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 15:51:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kq0F6-0005nb-Qy for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 15:51:20 -0500 Original-Received: from mail-yb1-xb2e.google.com ([2607:f8b0:4864:20::b2e]:43243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kq0F5-0000kc-H0 for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 15:51:20 -0500 Original-Received: by mail-yb1-xb2e.google.com with SMTP id y128so7443070ybf.10 for ; Thu, 17 Dec 2020 12:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RZrLCiEbueEgIaH+FW5RMfsV5QW5wAuD9xf9KMKitxA=; b=t2NfLxtU+ik4FfEdbSvMbZVWcz+PnbmgaoBO8GBLhpbdrhWP5y6N+nSW9JVsRgDWK8 LrMZ4VtjGAmnpqTMstfh6CaR4V1PxjxAhi3vN7fQdxdzmlJrFzHilxhasAump9IeCMyo /14EaVXn5+9CXbz4aVJHjYanX+GzXKcMrUWMzXbuA6lWESKsntHGHlpBtOmnK6Qv4DVa wA1h9L16g6PNNeIsNDe/hvjHknb1m/zg5cFYbfvjZJdKd9lWzAoM7XI9btmCDk5bH0Jr PW5ql4gOMdNazD8ZzXp7UEUp6dK/u7MQ7OkLIZMt/9lY/StnW+MST5ylN62qeVep5lJe rvtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RZrLCiEbueEgIaH+FW5RMfsV5QW5wAuD9xf9KMKitxA=; b=iGSsjuxKlHUgRXJnpGzo7nklKV7c6O0SJROzO3pDyeDabKm5alh308eZSKdjP7/7FF a3qQEHCshBKRR3QS6XpmWrkrf8dgKCeF0H6T2QvwgG4ZoNByDb41S64M8Bi4IYqxwKYv y6qgXxXot7qHXEH6Vcqhgh/cAJDbmgtAP4/TEyeqbwQVeUxl+LflTqVF9WU84L8ELFBX xKRFat9YY4byywLicj6aHxXGM1/I6k3hhREEWIjQLNXg1b1xUTVpWT1MtLyPc20FFx0Y 7jCpPBjtDKuulxP2UCs2PLFVDplWfLZWWBa1z2a8bNfl04rJbd48FdB++A42Ul0skEKe 1Ayw== X-Gm-Message-State: AOAM530A5u4tsoajuHNv0Bny9L6DLdhOyEQjvFrXO8qH3dQXdWKjdGZK luirRi/XbQGfq/Bu2kk3hLYmXUKMVZOY/KDaKJ9A1bk= X-Google-Smtp-Source: ABdhPJy1caB8rtHWTCM29brRf4qZ0GgWYpkIgyC/aurbuQCsoYuZeFBpx0QcwVBBM0+q2ZHof1HLfAtsyk+NvQaLnxs= X-Received: by 2002:a25:e694:: with SMTP id d142mr1497213ybh.494.1608238278387; Thu, 17 Dec 2020 12:51:18 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2e; envelope-from=skip.montanaro@gmail.com; helo=mail-yb1-xb2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126473 Archived-At: > `format-time-string=E2=80=99 seems to use Lisp timestamps which can be cr= eated > with `encode-time=E2=80=99. The following seems to solve your initial pr= oblem: > > (format-time-string > "%Y-%m-%d" > (encode-time (decoded-time-add (parse-time-string "2020-05-17") > (make-decoded-time :day 1)))) Thanks, yes, I just hit on that as well. Now to actually use this knowledge before I forget it... :-) Skip