Exa: Idea: compressed "ago" dates

Created on 11 Aug 2017  路  10Comments  路  Source: ogham/exa

Dates like 16 Jun 2016 occupy reasonable screen space and requires mental parcing to determine how long ago it was.

In compressed dates mode it should be short and relative to current datetime:

  • Within 30 seconds of now => NOW (in red)
  • less than 60 minutes => XXmin
  • less than 24 hours => XXhrs
  • less than 32 days => XXday
  • less than 12 months => XXmon (maybe other colour starts here)
  • ... => Xyear
  • more than 9 years => OLD (bold?)
  • zero UNIX time => --- (pale gray)

Most helpful comment

+1 for this feature.

FWIW, I use ls++ (https://github.com/trapd00r/ls--/blob/master/ls%2B%2B), which displays colored relative time.
Thinking about it, I think the colors are a nice touch, which helps me find what I want faster.

image

image

Versus:

image

All 10 comments

I love timeago, so I would appreciate this feature. Do you know of an existing fuzzy timestamp library for Rust? I can't seem to find anything on Google.

Existing fuzzy timestamp will unlikely be short and fixed width.

We can develop such a library (only displaying, no parsing), it shouldn't be too hard.

Good point! Are you interested in implementing this yourself, or do you want to leave that to someone else? I'd be happy to, assuming @ogham is okay with the general idea.

Quickly hacked up a crate: timeago

@vlnx , Is my timeago crate not fit for this job? Should something from that patch be factored into it?

I'm just new to rust and wanted to modify it more than pulling in a new package.

Cool idea, but I think, if something is older than 9 year, it should display the date itself instead of OLD.

+1 for this feature.

FWIW, I use ls++ (https://github.com/trapd00r/ls--/blob/master/ls%2B%2B), which displays colored relative time.
Thinking about it, I think the colors are a nice touch, which helps me find what I want faster.

image

image

Versus:

image

+1
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonsolnes picture simonsolnes  路  3Comments

CosmicToast picture CosmicToast  路  4Comments

jmks picture jmks  路  3Comments

skyzyx picture skyzyx  路  4Comments

raxod502 picture raxod502  路  5Comments