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

Less than 5 seconds ago -> Just now #6

Open
janwirth opened this issue Jan 25, 2021 · 3 comments
Open

Less than 5 seconds ago -> Just now #6

janwirth opened this issue Jan 25, 2021 · 3 comments

Comments

@janwirth
Copy link

When I create a new entry and look at it, I think "just now" reads better than "less than five seconds ago".

@janwirth
Copy link
Author

image

@AdrianoFerrari
Copy link
Contributor

AdrianoFerrari commented Feb 1, 2021

You might be right, but that is a matter of taste/use-case. Wouldn't it be simpler to do an if statement in your code before calling the library?

If (Time.posixToMillis t2 - Time.posixToMillis t1) < 5000 then
  "Just now"
else
  callThisLibrary

?

@AdrianoFerrari
Copy link
Contributor

AdrianoFerrari commented Feb 1, 2021

A better change would be to add {includeSeconds : Bool} to Config type, so you can choose to have second-level granularity or not.

Would welcome a PR, but this isn't high enough priority for me to implement at the moment. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants