Uh oh!
There was an error while loading. Please reload this page.
implement DateOnly/TimeOnly - #2051
Merged
Merged
Conversation
fix#1715 adds net6 TFM
sander1095
commented
Apr 16, 2024
Hi @mgravell . Shouldn't this have been a MINOR release instead of a PATCH? Also, should people now delete their own |
mgravell
commented
Apr 16, 2024
MemberAuthor
I'll try to be more mindful of versioning |
sander1095
commented
Apr 16, 2024
Hi @mgravell ! I just want to say that I didn't mean to be rude or give critique :) I appreciate your work and meant it more as a question/suggestion. |
This was referenced Jul 24, 2025
This was referenced Aug 5, 2025
This was referenced Aug 20, 2025
This was referenced Nov 14, 2025
This was referenced Dec 15, 2025
This was referenced Jan 11, 2026
This was referenced Jul 23, 2026
This was referenced Jul 31, 2026
This was referenced Aug 8, 2026
This was referenced Aug 20, 2026
mgravell added a commit
that referenced
this pull request
Aug 20, 2026
…isabled (#2228) DateOnly/TimeOnly support (#2051) was compiled out in 907a4d9 pending #2071/#2072. This re-enables it with the root causes fixed, and teaches the read paths that the date/time family has no IConvertible bridge - which box a date or time column yields is a provider/version decision (Npgsql 10: DateOnly/TimeOnly; SqlClient and Npgsql 9: DateTime/TimeSpan), so both shapes must convert: - GetFieldValue<T> is no longer demanded of a column whose reported type needs a family conversion (a datetime column into a DateOnly member was the #2072 breakage; SqlDecimal-style entries, where GetFieldValue from a differently-reported column is the whole point, keep it); - the member, scalar and Parse<T> paths all convert DateOnly/TimeOnly <-> DateTime/TimeSpan in both directions (IL for members, object-level elsewhere), fixing reads against Npgsql 10 date/time columns (#2226); - Query<DateOnly>/<TimeOnly> in scalar form no longer silently return default(T) (#2227): the typeMap entries make them simple types again; - the same-TypeCode direct-unbox shortcut is restricted to distinct codes: TypeCode.Object matching TypeCode.Object says nothing (TimeSpan into TimeOnly? threw), while object on either side (sql_variant columns, dynamic members) keeps the direct unbox; - the scalar conversion fallback keeps Convert.ChangeType's strict null contract (TestConversionExceptionMessages pins it). The parked DateTimeOnlyTests are re-enabled, with new tests for the #2072 shape (datetime column into DateOnly member), the #2227 scalar shape, and date-as-DateTime regression guards; PostgresqlTests gains the Npgsql-10 interchange matrix ([FactPostgresql], so it runs where the documented container is available). Fixes#2072, #2226, #2227, #1728; expected to also resolve#2071.
This was referenced Aug 28, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix#1715
adds net6 TFM