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 support for new time-related display hints #789

Merged
merged 5 commits into from
Dec 15, 2023

Conversation

andresovela
Copy link
Contributor

@andresovela andresovela commented Oct 15, 2023

This PR adds a few time-related display hints:

{:ms}

This prints a timestamp as seconds, considering the input as milliseconds, e.g. a timestamp 1234 prints as 1.234

{:ts}

This prints a timestamp as human-readable time, considering the input is seconds, e.g. a timestamp 123 prints as 00:02:03

{:tms}

This prints a timestamp as human-readable time, considering the input is milliseconds, e.g. a timestamp 123456 prints as 00:02:03.456

{:tus}

This prints a timestamp as human-readable time, considering the input is microseconds, e.g. a timestamp 1234567 prints as 00:00:01.234567

Copy link
Contributor

@jonathanpallant jonathanpallant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - thanks!

@jonathanpallant jonathanpallant added this pull request to the merge queue Dec 15, 2023
Merged via the queue into knurling-rs:main with commit c6e0e95 Dec 15, 2023
15 checks passed
@andresovela andresovela deleted the time-display-hints branch December 15, 2023 17:13
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.

2 participants