lsd-rs / lsd-rs/lsd

Support Absolute and Relative Date Formats Together

Open
#1,118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
16.2k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

Currently, lsd only allows setting the date format to either an absolute format (e.g., +%Y/%m/%d %H:%M:%S) or a relative format (relative), but not both at the same time. It would be useful to display both formats together.

Expected Behavior

A way to configure lsd to show both absolute and relative dates, such as:

2025/01/31 22:10:23 (5 minutes ago)
Suggested Implementation
  • Allow specifying both formats, for example:
    date: ['+%Y/%m/%d %H:%M:%S', 'relative']
    
  • Or introduce a new option, like:
    date: '+%Y/%m/%d %H:%M:%S'
    show_relative: true
    
Use Case

This would provide both precise timestamps and an easy-to-read relative time, improving usability.

Would this be possible to implement?
Thanks for considering it 🙏

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating lsd's date-format configuration and date-rendering code, then inspect existing date-related tests; done means one configuration supports both the requested absolute timestamp and relative text together.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.