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

Added unixtimestamps support for date parser #55

Closed
wants to merge 2 commits into from

Conversation

rmarku
Copy link

@rmarku rmarku commented May 2, 2024

I base this PR in #48 as I wanted to remove the fmt.Print statement too (#48 should be merged first).

This PR add support to Unix timestamp dates in the getParsedDate function. Before fail, it tries to convert the date string to an integer and then get the time.Time from its Unix time representation.

There could be some more test to verify this number represented in a string is not something else, like a date range maybe?

Added a test page where I found this timestamp thing.

Copy link
Member

@fmartingr fmartingr left a comment

Choose a reason for hiding this comment

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

Hey @rmarku, thank you for the contribution! This seems like a useful addition. Im worried about spending too much parsing time in this function but it is what it is.
Let's wait until we settle up in #48 and then we are good to go.

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.

None yet

3 participants