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

feat(postgrest): use Date when filtering columns #514

Merged

Conversation

LucasAbijmil
Copy link
Contributor

@LucasAbijmil LucasAbijmil commented Aug 26, 2024

What kind of change does this PR introduce?

When using filters on Timestampz typed columns, the Date.now.description declaration only works for users with time in 24-hour format and not for those using 12-hour one.
This pull request makes using filters simpler and less error-prone when manipulating the Date type.

What is the current behavior?

In order to use filters with Date type, we need to have a custom logic in order to make it works properly.

What is the new behavior?

When using a filter, the Date.now (or Date()) works by the book without having to implement a custom logic.

Additional context

If my change doesn't work on other Date/Time types, please let me know. I would be happy to make this works for everyone and every Date/Time type

@grdsdev
Copy link
Collaborator

grdsdev commented Aug 26, 2024

That is a very good improvement, let me make a few tests using other time/date types to see how it behaves.

@grdsdev grdsdev changed the title Feature: Add conformance to URLQueryRepresentable for Date feat(postgrest): use Date when filtering columns Aug 26, 2024
@LucasAbijmil
Copy link
Contributor Author

That is a very good improvement, let me make a few tests using other time/date types to see how it behaves.

Thank you very much! I hope we can find a solution to make things easier for everyone :)

@grdsdev grdsdev merged commit 1b0155c into supabase:main Aug 28, 2024
4 checks passed
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