Repository navigation
docs: say exactly where the calendar factories' limits come from (#450) - #455
Merged
Merged
Conversation
- PostgreSQL's first date is 4714-11-24 BC, so the month and the year that hold it have no start, with Npgsql's infinity conversions on or off. That, not -infinity, is why the LocalDateRange and YearMonthRange forms stay in memory. Five places. - The first period starts at -infinity and the last ends at infinity, and both are the days themselves with Npgsql.DisableDateTimeInfinityConversions. E76 follows. - An out-of-range month, quarter or year 0 raises make_date's own error, which shows the date it was asked for (Quarter(2026, 5) reports 2026-13-01); the year and week guards name the argument. Measured on PostgreSQL 16.15. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 25, 2026
Closed
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 free
to 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.
Closes #450
Problem
Three sentences about the calendar factories in
docs/efcore.md#what-runs-wherewere imprecise:LocalDateRange/YearMonthRangerow, the EF Core README, the four calendar entries intranslation-support.jsonandNodaCalendarFactoryClientSideTests' summary said "the years before 4713 BC have no PostgreSQL date", and led with-infinity. PostgreSQL's first date is 4714-11-24 BC. The month and the year that hold it can't be built (date_truncraises "timestamp out of range"), with Npgsql's infinity conversions on or off.-infinityandinfinity": the first period starts there. WithNpgsql.DisableDateTimeInfinityConversionsset, both are the days themselves.make_date, whose error shows the date it was asked to build (Quarter(2026, 5)→2026-13-01). Only the year and week guards name the argument.Change
quotefollows it.The decision to keep the NodaTime forms in memory is unchanged.
Tests
Docs only. Each statement was measured on PostgreSQL 16.15:
'4714-11-24 BC'::dateworks and'4714-11-23 BC'::datedoesn't;date_trunc('month'|'year', …)over PostgreSQL's first day raises; andmake_date(2026, 13, 1)andmake_date(0, 6, 1)print the date.OracleCatalogueTestsholds E76's quote to the new sentence. The conventions tests (417) pass.🤖 Generated with Claude Code