Skip to content

Feature Request: Configurable date format in description #342

@Macavirus

Description

@Macavirus

Description

The "Date copied" description line currently uses a hardcoded format with nanosecond precision (2006-01-02 15:04:05.999999999), which is quite verbose. It would be great to have a configurable dateFormat option in config.json to customize how the timestamp is displayed.

Proposed config option

{
    "dateFormat": "2006-01-02 15:04"
}

This would use Go's standard time layout string, giving users full control. Some examples:

  • "2006-01-02 15:04"2026-03-06 16:21 (no seconds/ms)
  • "Jan 2 15:04"Mar 6 16:21 (compact)
  • "Mon 15:04"Thu 16:21 (minimal)

The default could remain the current full-precision format for backwards compatibility.

Context

The current format shows sub-second precision which isn't useful for most users. The existing enableDescription option allows hiding the line entirely, but a middle ground of showing a simplified timestamp would be preferable. Currently the only workaround is to make the description text nearly invisible via theme colors.

Implementation notes

The format is defined as DateLayout in utils/constants.go and used in utils/string.go's GetTime(). The display is constructed in app/model.go's filterItems() as "Date copied: " + entry.Recorded. A config option could either:

  1. Change the storage format (simpler but affects existing history)
  2. Reformat at display time by parsing the stored timestamp and formatting with the user's preferred layout (more flexible, preserves full precision in storage)

Option 2 would be cleaner since it keeps full precision in the JSON while showing a user-friendly format in the TUI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions