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

WIP: feat(xact): add default time when copying transaction #281

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

Conversation

Fuco1
Copy link
Contributor

@Fuco1 Fuco1 commented Jan 2, 2021

Use the transaction's time as default time when asking when the copy should be
created. This allows us to use the relative syntax of org-read-date to move the
transaction an <interval> forward or backward from the time of the transaction:

+1d (+ 1 day from TODAY)
++1d (+ 1 day from DEFAULT-TIME, i.e. date of the original transaction)

In other words, single +/- is relative against today and double ++/-- is
relative against the DEFAULT-TIME (see C-h f org-read-date).

Note that since currently the DEFAULT-TIME is today, this feature is only
strictly adding functionality and should therefore be fully backward-compatible.

@Fuco1 Fuco1 changed the title feat(xact): add default time when copying transaction WIP: feat(xact): add default time when copying transaction Jan 2, 2021
@Fuco1
Copy link
Contributor Author

Fuco1 commented Jan 2, 2021

For some reason the default time is shifted one day back, I think it might be some time-zone related issue with org read date.

@Fuco1
Copy link
Contributor Author

Fuco1 commented Jan 2, 2021

Oh, this actually changes the behaviour when user only hits RET upon the query. It will copy to the original date instead of today. I think that is a significant breaking change unfortunately :(

I still want to have some option to add past transactions easily, so I'll play with this a little bit more.

@Fuco1 Fuco1 force-pushed the feature/default-time-copy-xact branch from 8da4d98 to 65b7fcf Compare January 2, 2021 15:13
Use the transaction's time as default time when asking when the copy should be
created.  This allows us to use the relative syntax of org-read-date to move the
transaction an <interval> forward or backward from the time of the transaction:

+1d (+ 1 day from TODAY)
++1d (+ 1 day from DEFAULT-TIME, i.e. date of the original transaction)

In other words, single +/- is relative against today and double ++/-- is
relative against the DEFAULT-TIME.

Note that since currently the DEFAULT-TIME is today, this feature is only
strictly adding functionality and should therefore be fully backward-compatible.
@Fuco1 Fuco1 force-pushed the feature/default-time-copy-xact branch from 65b7fcf to 58fe513 Compare August 7, 2022 20:52
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.

1 participant