-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Day ago count is wrong in issue comments #1906
Comments
You could also use a JS library to automatically and dynamically change the time, e.g. timeago.js. The aforementioned library also includes translations if that's something. This is just throwing it out there, I see that you do this when pages are requested in Gitea. GitHub uses JS as well to automatically change |
Note that at this moment, the test issue linked above is showing the days ago correctly. There may be only a short span of time where this bug shows itself, or a certain time of day. @sondr3 I agree that using a JS library might be a better solution than having it done on the server. I am also perfectly fine with the phrase |
|
@lunny This is a bug. (See https://try.gitea.io/gitpitch/code-presenting/issues/1)
Monday and Tuesday are not both |
No it's not a bug...
6th 03:26 => 7th 19:21 == 1 day, 15h 55m So |
It would however be an enhancement. But it would be very hard to do correctly... Don't want 5 minutes to show up as "1 day" ( |
Wouldn't it be good start with: |
Which is more or less what the JS libraries do. |
I agree that we should use an existing JS-lib for this. Just keep the license in mind 😉 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
[x]
):Today is
Wednesday June 7 (19:21:25 UTC)
. The test issue in the above linked issue was created onMonday June 5
and was closed onTuesday June 6
. Here is what is displayed:Since
7 - 5 = 2
It should read2 days ago
for the number of days ago it was created.I also suggest that
1 day ago
should actually readyesterday
.The text was updated successfully, but these errors were encountered: