Skip to content

Support YYYY-MM date ranges - #162

Merged
ejsmith merged 1 commit into
mainfrom
feature/year-month-ranges
Oct 1, 2026
Merged

ejsmith merged 1 commit into
mainfrom
feature/year-month-ranges

Conversation

@ejsmith

@ejsmith ejsmith commented Oct 1, 2026

Copy link
Copy Markdown
Member

DateTimeRange.Parse("2025-01") and [2025-01 TO 2025-01] currently fall back to the unrestricted Empty range. Add native YYYY-MM parsing so they resolve to January 1 through January 31, using the supplied offset and existing boundary-inclusivity rules. This enables exceptionless/Exceptionless#2617 to remove its API-side month expansion after adopting the updated package.

Reuse the month boundary handling in DateMath for standalone ranges and range components. This intentionally corrects DateMath.Parse("2025-01", baseTime, isUpperLimit: true) from January 1's end to January 31's end. Named timezones resolve their offset at each boundary, including DST changes; existing year, day, and timestamp formats remain covered by regression tests.

Validation:

  • Build passes for net8.0 and net10.0 with zero warnings.
  • All 802 tests pass, including month lengths, leap years, offsets, DST, all bracket combinations, comparisons, mixed precision, invalid input, date limits, and dash-separated years. Local tests use temporary TZDIR aliases for existing US/* timezone tests; no system timezone files were changed.
  • Ran dotnet format and git diff --check.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T16:07:50.121050Z 3261845 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ejsmith
ejsmith merged commit 8dee353 into main Oct 1, 2026
3 checks passed
@ejsmith
ejsmith deleted the feature/year-month-ranges branch October 1, 2026 16:13
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.

1 participant