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

Add new --align-intervals option #2305

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ian2020
Copy link

@Ian2020 Ian2020 commented Nov 29, 2023

Suggested fix #2304. I add a new --align-intervals option that forces all intervals to align with a begin time if specified by the user in their period expression.

With this change you can choose a custom start time for your intervals, here we start our quarters on the 15th:

> test reg -p "quarterly from 2008/01/15" --align-intervals
08-Jan-15 - 08-Apr-14           Assets:Cash                $-300.00     $-300.00
                                Expenses:Books              $150.00     $-150.00
                                Liabilities:Cards           $150.00            0
08-Apr-15 - 08-Jul-14           Assets:Cash                $-660.00     $-660.00
                                Expenses:Books              $330.00     $-330.00
                                Liabilities:Cards           $330.00            0

I have not done any C++ in a long time, so please let me know if this can be improved!

@afh afh added the enhancement New feature or request label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intervals are always aligned with start of week, month, quarter or year
2 participants