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

Add datetime string to span element as title #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mschoettle
Copy link

@mschoettle mschoettle commented Oct 30, 2024

This is a simple solution to get the datetime on hover over the <span> element.

image

Alternative/additional solution

GitHub and GitLab include the timezone as well:

GitHub

image

GitLab

image

We could also consider having the title include the timezone (although I realized that depends on the presence of the timezone setting as well, otherwise it would be UTC) [side question here: would it be better to default to the system timezone here?]

Fixes #131

@timvink
Copy link
Owner

timvink commented Oct 30, 2024

Thanks for the contribution !

@timvink
Copy link
Owner

timvink commented Oct 30, 2024

It seems we need to update some unit tests also

@timvink
Copy link
Owner

timvink commented Oct 30, 2024

And tz is tricky as browsers might convert it to local timezone. Good to add.

@mschoettle
Copy link
Author

Sorry, I made a silly mistake. Now the tests run through.

And tz is tricky as browsers might convert it to local timezone. Good to add.

Good to add the timezone to the string? Would you prefer this as a separate date format or part of datetime?

@mschoettle
Copy link
Author

Ping @timvink

Is this good as is or should we add the timezone as well (see questions above)?

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

Successfully merging this pull request may close these issues.

Feature Request: Show datetime on hover when using timeago
2 participants