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

Specifying vacation intervals #7

Closed
Blackjacx opened this issue Dec 19, 2023 · 3 comments
Closed

Specifying vacation intervals #7

Blackjacx opened this issue Dec 19, 2023 · 3 comments

Comments

@Blackjacx
Copy link

Hey there 👋

first of all great work 👍

I wanted to ask if it is currently possible to specify time intervals for vacation. Right now I have to specify each day separately which might become a huge list over the years:

project1 {
  # started time recordings on 2023-11-13
  from 2023-11-13 {
    mon 8:00
    tue 8:00
    wed 8:00
    thu 8:00
    fri 8:00
  }

  # specifying vacation

  2023-11-15 -8:00 "Vacation in Spain"
  2023-11-16 -8:00 "Vacation in Spain"
  2023-11-17 -8:00 "Vacation in Spain"
  2023-11-20 -8:00 "Vacation in Spain"
  2023-11-21 -8:00 "Vacation in Spain"
  2023-11-22 -8:00 "Vacation in Spain"
}

round_interval = no
@guludo
Copy link
Owner

guludo commented Dec 19, 2023

Hey, there.

Another way to do it is to "close" a period and start a new one. Example:

project1 {
  # started time recordings on 2023-11-13
  from 2023-11-13 to 2023-11-15 {
    mon 8:00
    tue 8:00
    wed 8:00
    thu 8:00
    fri 8:00
  }

  # Vacation from 2023-11-15 to 2023-11-22 (inclusive)

  # Getting back to work on 2023-11-23
  from 2023-11-23 {
    mon 8:00
    tue 8:00
    wed 8:00
    thu 8:00
    fri 8:00
  }
}

round_interval = no

Although I agree that having a better way of specifying them would be good. Maybe we could extend the date entries syntax to allow passing intervals instead of a single date?

@Blackjacx Blackjacx changed the title Specifying varacton intervals Specifying vacation intervals Jan 2, 2024
@Blackjacx
Copy link
Author

Yeah I'm going with one of these approaches for now. Thanks for clarification 👍

@guludo
Copy link
Owner

guludo commented Apr 16, 2024

Hey, @Blackjacx.

Just letting you know that I have just added a new feature: the except keyword. With that, we can turn the example above into:

project1 {
  # started time recordings on 2023-11-13
  from 2023-11-13 {
    mon 8:00
    tue 8:00
    wed 8:00
    thu 8:00
    fri 8:00

    # Vacation from 2023-11-15 to 2023-11-23 (exclusive)
    except 2023-11-15 to 2023-11-23 "Vacation"
  }
}

round_interval = no

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