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

New aggday: time interval #310

Open
1 of 2 tasks
dreeves opened this issue Sep 26, 2023 · 0 comments
Open
1 of 2 tasks

New aggday: time interval #310

dreeves opened this issue Sep 26, 2023 · 0 comments
Assignees
Labels
PEA Easy-peasy RFE Request For Enhancement SKY Pie in the sky UVI

Comments

@dreeves
Copy link
Member

dreeves commented Sep 26, 2023

Desiderata

Preview Give feedback

Copied from a forum post by Clive:

I was looking at clocky to measure total sleep time: I'd hoped that if I set my deadline to 14:00, then I could add a datapoint of (say) 22:00 for when I went to bed, add the next datapoint for 06:15 when I get up, and because those are logically on the same day (after the 14:00 deadline), it would faithfully report that I'd slept for 08:15 hours.

Sadly it doesn't work like that at all, it just looks for differences between the datapoints. I'm running a test goal right now, and it's not even clear to me what it's going to do for a pair of datapoints like (22:00, 06:15). They are on different physical days, but it's the same logical Beeminder day as the deadline for the goal is at 14:00, and just skimming the code I'm not sure how that cashes out.

So: can we have a nice time_interval function that actually works as one would expect here, including intervals that cross midnight (if they're on the same logical day)?

Pseudocode is something like:

  • for each time, calculate elapsed_time since deadline:
    • if time > deadline: elapsed_time = time - deadline
      else: elapsed_time = time - deadline + 24
  • take pairwise differences of these elapsed_times

Cognata

Verbata: new aggday methods,

@dreeves dreeves added RFE Request For Enhancement PEA Easy-peasy SKY Pie in the sky UVI labels Sep 26, 2023
@dreeves dreeves self-assigned this Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PEA Easy-peasy RFE Request For Enhancement SKY Pie in the sky UVI
Projects
None yet
Development

No branches or pull requests

1 participant