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

[PowerToys Run] [Time and Date] Infer input format #36906

Closed
PRO-2684 opened this issue Jan 16, 2025 · 1 comment
Closed

[PowerToys Run] [Time and Date] Infer input format #36906

PRO-2684 opened this issue Jan 16, 2025 · 1 comment
Labels
Resolution-By Design Reported behavior reflects what the code is expected to do; it does not imply the design is good. Run-Plugin Things that relate with PowerToys Run's plugin interface

Comments

@PRO-2684
Copy link

PRO-2684 commented Jan 16, 2025

Description of the new feature / enhancement

For now, I need to explicitly specify the timestamp format (* I've set t as the direct activation command):

Image

If I skip it, the plugin will refuse to parse it:

Image

However, when I type 1737008124773, mostly I'd expect it to be parsed as ums.

To be specific, I suggest using the following regexes for inferring input format, instead of requiring explicit annotation:

Input Format
\d{13} ums
\d{10} u

Explicit prefixes are still required for inputs that do not match any of them.

Scenario when this would be used?

Say I've copied a timestamp from somewhere. With inferring I only need to:

  1. Invoke the direct activation command
  2. Paste that timestamp

Without inferring I'd have to:

  1. Invoke the direct activation command
  2. Paste that timestamp
  3. Read through the lengthy error message
  4. Figure out whether the timestamp is u or ums
  5. Move the cursor before the timestamp
  6. Give it a proper prefix

Which is just so annoying and unproductive.

Supporting information

No response

@PRO-2684 PRO-2684 added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jan 16, 2025
@htcfreek
Copy link
Collaborator

The problem is that you theoretically want to convert 1 unix millisecond. And then there are not enough digits to detect the format.

@htcfreek htcfreek added Run-Plugin Things that relate with PowerToys Run's plugin interface Resolution-By Design Reported behavior reflects what the code is expected to do; it does not imply the design is good. and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 17, 2025
@htcfreek htcfreek closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-By Design Reported behavior reflects what the code is expected to do; it does not imply the design is good. Run-Plugin Things that relate with PowerToys Run's plugin interface
Projects
None yet
Development

No branches or pull requests

2 participants