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

Support bracketed date style when composing new entry #1915

Open
2 tasks
micahellison opened this issue Aug 24, 2024 · 0 comments · May be fixed by #1918
Open
2 tasks

Support bracketed date style when composing new entry #1915

micahellison opened this issue Aug 24, 2024 · 0 comments · May be fixed by #1918
Labels
enhancement New feature or request 📌 This can't go stale ready for pr Okay to start work. Feel free to ask questions.

Comments

@micahellison
Copy link
Member

Use Case/Motivation

Currently, you can use command-line style dates to specify a new entry's date when composing new entries, but not the bracketed dates that jrnl uses in its storage format and when editing entries.

Example Usage

Run jrnl with no arguments. Your editor or the standard input editor will appear.

You can already do this, which is good and worth keeping:

tomorrow: Here is my entry

The entry will be written with tomorrow's date.

However, you should also be able to do this:

[2024-08-26 08:00] Here is my entry on August 26

Currently, that would create a new entry with today's time, and the entry would contain [2024-08-26 08:00] Here is my entry on August 26. This enhancement should instead parse that bracketed value and created a new entry on the specified date, where the entry only contains: Here is my entry on August 26.

Other Information

Hat tip @alichtman for filing #1906 which is one step ahead of this enhancement.

A resolution to this should:

  • Support this format in compose mode in a way that is the same as in the edit mode
  • Add new tests as necessary
@micahellison micahellison added enhancement New feature or request 🆕 New! 📌 This can't go stale ready for pr Okay to start work. Feel free to ask questions. and removed 🆕 New! labels Aug 24, 2024
chwt added a commit to chwt/jrnl that referenced this issue Sep 24, 2024
…rg#1915)

Bracketed dates like [2020-01-01] will be parsed and used as the entry date, thus be removed from the entry text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📌 This can't go stale ready for pr Okay to start work. Feel free to ask questions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant