-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Default DateTimeKind configuration #195
Conversation
PR Summary
|
I was not quite sure how to add a test here. Did not see a specific example to test a value type - if a test is required, feel free to give pointers or any examples and I will add it to this branch. Since this was a bug that I was facing while using this library with postgres, I have a test in my code base that I did to ensure this works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @moxplod,
Thanks for the PR! 😊 I've added some suggestions. Last week, I was thinking that maybe supporting both DateTimeStyles and CultureInfo instead of just DateTimeKind would be more beneficial. This way, users could have more control not only over the kind but also the formatting of their dates.
I'd like to spend some time researching this further to find the best approach that addresses all date-related issues. I'd say there's a 70% chance I'll keep your changes and add DateTimeKind support to Gridify, but it's possible we might have an even better solution.
Since you're dealing directly with these issues, I'd love to hear your feedback on whether supporting both CultureInfo and DateTimeStyles would be more effective. Isn't that the way to go?
Looking forward to hearing from you!
I forgot the tests, it is definitely required but please let me know if you couldn't add a few tests for these changes, I'll try to add it to your branch |
Hey - I mentioned in my commit comment, I was not sure how to add a test to verify that this is working in the Gridify solution. Essentially how do I test that the final parameters are the right DateTime Kind. Could use your help here. I verified it on my solution and added tests to ensure that postgres dates filtering was working with Gridify to verify it. You can feel free to add a test or send me pointers to do it and I am happy to add that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have addressed all concerns.
Not sure if I know a use case on top of mind that would require CultureInfo to be specified. In Sql Server or Postgres I have not faced that requirement. I would say let's push this for now and if a future requirement of CultureInfo comes around, we can modify it then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌💐
Description
This is so we can specify a DateTimeKind to the dates that are parsed. More details in the issue.
Fixes # (issue)
Type of change
Checklist