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

show event full timestamp #777

Closed
ctf0 opened this issue Sep 20, 2018 · 0 comments · Fixed by #782
Closed

show event full timestamp #777

ctf0 opened this issue Sep 20, 2018 · 0 comments · Fixed by #782

Comments

@ctf0
Copy link

ctf0 commented Sep 20, 2018

What problem does this feature solve?

atm the events timestamp shows as H:M:S is it possible to show it all the way down to ms ?

this is helpful because currently vue doesnt offer a way to check if an event was fired or not and to get around that we need to use setTimeout which is not the same with all the events. example https://forum.vuejs.org/t/how-to-check-if-an-event-was-fired-or-not/43828

What does the proposed API look like?

// before

export function formatTime (timestamp) {
  return (new Date(timestamp)).toString().match(/\d\d:\d\d:\d\d/)[0]
}

// after

export function formatTime (timestamp) {
  let date = new Date(timestamp)

  return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}:${date.getMilliseconds()}`
}
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 a pull request may close this issue.

1 participant