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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] parse timestamps #234

Closed
whyboris opened this issue Nov 16, 2021 · 5 comments
Closed

[Proposal] parse timestamps #234

whyboris opened this issue Nov 16, 2021 · 5 comments

Comments

@whyboris
Copy link

whyboris commented Nov 16, 2021

Feels like an easy thing to add:

parse a timestamp like 1637093119.558717 or 1637093119

which would convert to November 16, 2021 8:05:19 PM

Currently what thinks it's a "phone number" or "American social security number" 馃し

Cheers 馃槑

@ghost
Copy link

ghost commented Nov 17, 2021

We have an issue for this: #115

@whyboris
Copy link
Author

@piatrashkakanstantinass -- seems rather unrelated. Your issue is about going on the internet to check the validity of a YouTube video.

The feature I propose is as simple as checking whether the input is a number, whether it's of a certain length, and if so, parsing it as a date 馃憣

@ghost
Copy link

ghost commented Nov 18, 2021

My issue is about adding non-regex checkers and you provided a great situation where it could be useful. Pinging urls is just an example.

@bee-san
Copy link
Owner

bee-san commented Nov 19, 2021

I don't think parsing == checking, but I agree. However! I am not sure if this should be done at print time or API time, because I think this could genuinely be useful for people using the API 馃

@ghost
Copy link

ghost commented Nov 19, 2021

I don't think parsing == checking, but I agree. However! I am not sure if this should be done at print time or API time, because I think this could genuinely be useful for people using the API 馃

I think that API should return the same output as CLI, so at API time. I imagine checkers being like a filtration function: it gets a match object and can modify it. If the function returns None, then match will not appear in the output.

@whyboris I will update my issue with better naming and examples and will close this one since this is a duplicate.

@ghost ghost closed this as completed Nov 20, 2021
This issue was closed.
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

No branches or pull requests

2 participants