Skip to content

Support bracketed date style when composing new entry #1915

Open
@micahellison

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    📌This can't go staleenhancementNew feature or requestready for prOkay to start work. Feel free to ask questions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions