Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intra-day recurrence rules #69

Closed
earowang opened this issue Apr 30, 2020 · 5 comments
Closed

intra-day recurrence rules #69

earowang opened this issue Apr 30, 2020 · 5 comments

Comments

@earowang
Copy link

Hi Davis,

Do you plan to support POSIXct, hms/difftime for intra-day recurrence rules? The {almanac} can be a backbone of tsibble's calendar feature.

@DavisVaughan
Copy link
Owner

DavisVaughan commented Apr 30, 2020

It isn’t planned for the first release. Maybe in the far future, but it would likely require a pretty different approach because currently all events between since and until are generated and stored in the cache. This isn’t bad when the finest granularity is daily, but for a secondly() rule this could be painful. Maybe it’s okay though, and if secondly is used then it’s up to the user to ensure they aren’t generating a rule with a massive amount of events

I’ve also been able to totally avoid pain with time zones right now, which would have to be dealt with if this was added. The JavaScript library seems to have the approach where only UTC is really supported, which seems reasonable but confusing sometimes when you’re in a DST gap.

In the far future I’d like to swap the JavaScript dependency for a C one and use libical. From what I can tell they have better time zone support (and also support non Gregorian calendars so things like Chinese New Year could be implemented). That will require a decent amount of work to make sure it can be installed properly on all platforms

@DavisVaughan
Copy link
Owner

DavisVaughan commented Apr 30, 2020

Does the calendar/holiday part of tsibble really support intra day? https://github.com/tidyverts/tsibble/blob/master/R/holiday.R

Update: I could see business hours being useful

@DavisVaughan
Copy link
Owner

You should also take a look at vacation if you haven’t yet, it’s incomplete but that’s where the holiday part of this will go, and it probably what tsibble would use https://github.com/DavisVaughan/vacation

@earowang
Copy link
Author

Thanks Davis. Good to know your plan. I'm actually referring to this issue tidyverts/tsibble#18

Tsibble's holiday functions are just for australia holidays, and independent from the tsibble data structure.

@DavisVaughan
Copy link
Owner

I have decided that almanac won't support intra day events, but I did add a full holiday/calendar API in #96 and #97

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

No branches or pull requests

2 participants