Skip to content

feat: Add option to specify the time of day (BYHOUR, BYMINUTE)#9

Open
plammens wants to merge 1 commit intotkortekaas:masterfrom
plammens:feat/time-of-day
Open

feat: Add option to specify the time of day (BYHOUR, BYMINUTE)#9
plammens wants to merge 1 commit intotkortekaas:masterfrom
plammens:feat/time-of-day

Conversation

@plammens
Copy link
Copy Markdown

Example:

image

Output:

RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20231211;BYHOUR=16;BYMINUTE=0;EXDATE=20240322T000000

@tkortekaas
Copy link
Copy Markdown
Owner

Hey @plammens thanks a lot for the PR. I think this would be a good addition to the package. The rrule package for instance does support by hour and by minute. However, I would propose to make it possible to add multiple byHours and multiple byMinute's. Right now, as far as I can tell, it is only possible to add a single byHour and byMinute.
I had a look at this comment by the rrule package author about how he handles byMinute and byHour and there is some more complexity as we would also want to support bySetPos.
If we start providing support for byMinute and byHour, I would want to provide full support, so also provide support for the this rule, as copied from the rrule author's comment:
RRULE:FREQ=DAILY;INTERVAL=2;WKST=MO;BYSETPOS=1,5,9;BYHOUR=3,16,21;BYMINUTE=15,0,15

@plammens
Copy link
Copy Markdown
Author

Yes indeed, this for now was just a quick addition for my use case and it supports only a single BYHOUR and BYMINUTE. I agree it would be good to provide full support of the rrule specification, I'll see if I can get round to it sooner or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants