Skip to content

Adding raw conformance so SwiftData stores Day values correctly.#12

Merged
drekka merged 4 commits intomainfrom
develop
Mar 8, 2026
Merged

Adding raw conformance so SwiftData stores Day values correctly.#12
drekka merged 4 commits intomainfrom
develop

Conversation

@drekka
Copy link
Copy Markdown
Owner

@drekka drekka commented Mar 8, 2026

No description provided.

drekka and others added 4 commits March 8, 2026 13:17
…y, fix macro deprecations

- Day init(year:month:day:) now throws DayError for invalid inputs
- Day stores year, month, dayOfMonth directly alongside daysSince1970
- Removed DayComponents and CalendarDay — CalendarDays is now
  OrderedDictionary<Day, [Day]>
- Fixed deprecated MemberMacro expansion signatures (added conformingTo)
- Updated README and CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Month and year rolling now uses modular arithmetic to calculate the
target month/year, then clamps the day to the last day of that month.
This means Jan 31 + 1 month = Feb 28 (or 29) instead of overshooting
into March, and Feb 29 + 1 year = Feb 28 in non-leap years.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ility

Day now has a single stored property (daysSince1970) to prevent SwiftData
decomposing it into multiple columns. Year, month, and dayOfMonth are
accessed via the dayComponents computed property. CalendarDays values
changed from [Day] to [DayComponents].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@drekka drekka self-assigned this Mar 8, 2026
@drekka drekka merged commit 6ea895a into main Mar 8, 2026
2 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.

1 participant