guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shepherd calendar event bug


From: Felix Lechner
Subject: Re: Shepherd calendar event bug
Date: Fri, 16 Aug 2024 12:13:06 -0700

Hi Ludovic,

On Tue, Aug 13 2024, Ludovic Courtès wrote:

> I was able to reproduce the issue with current ‘devel’:

Thank you for that!

>     327:8 2 (next-calendar-event #<<calendar-event> seconds: (0)
>     minutes: (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
>     22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
>     44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59) hours: (1)
>     days-of-month: (1 2 3 4 5 6 7) months: (1 2 3 4 5 6 7 8 9 10 11
>     12) days-of-week: (0)> _)

Maybe some confusion between symbolic and integer days-of-week?

> this is asking for a Sunday 1st, or 2nd, etc. until 7th, contrary to
> what the comment says. [...] maybe what you want is to remove
> #:days-of-month?

I'm not sure about that.  To me, the timers seem to run at the
intersection of all values (effectively, a logical AND).  I'd like to
pick any Sunday that occurs during the first seven days of any month.

It would be the first Sunday in each month.

Also, here are some brief code questions, if you would be so kind to
entertain them:

Why are the ranges for minutes here [1] 0..60 instead of 0..59, and 0..7
for days-of-week instead of 0..6, please? Even if the intervals were to
exclude an end point [2] they seem inconsistent with 1..12 for the
months or 1..31 for days-of-month.  Also, should the interval for the
hours be 0..23 instead of 0..60?

Thank you for your hard work on these great new features!

Kind regards
Felix

[1] 
https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/service/timer.scm?h=devel#n440
[2] 
https://en.wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints



reply via email to

[Prev in Thread] Current Thread [Next in Thread]