Root cause: a data-integrity bug, not visual. The month grid is built from
.weekOfMonth (respects Calendar.current.firstWeekday), but the weekday header
was hardcoded Sunday-first ("S M T W T F S") and the week-number label was gated
on isSunday (weekday == 1). On any non-Sunday-first locale (or when the user sets
"Start Week On" = Monday) every column was mislabeled by one and the W-number
landed on the wrong column — e.g. June 1 2026 (a Monday) appearing under "S".
Fix:
- Extract pure, testable date math into CalendarGrid (monthGrid + weekdaySymbols).
- Header now derived from firstWeekday, so it always matches the grid.
- Week-number label gated on isWeekStart (weekday == firstWeekday), not Sunday.
- Document that week numbers are locale weekOfYear (consistent with the layout),
not ISO.
- gridDays() and the year-view mini-month dedupe to CalendarGrid.
Verification:
- New KisaniCalTests target with 9 tests, all passing on simulator: exact
Sunday-first June 2026 grid, header↔grid alignment for firstWeekday 1...7,
cell date identity, month navigation (May/Jul/Feb 2026 + Feb 2028 leap +
Dec 2026→Jan 2027), and event-day bucketing (all-day, late-night, midnight-
crossing) across 4 timezones.
- Verified in the running app: header S M T W T F S, May 31 in the Sunday
column, June 1 under Monday, June 24 (Wednesday) selected.
Adds a DEBUG-only KISANI_INITIAL_TAB launch env (compiled out of Release) used
to screenshot the calendar past the sign-in gate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
107 lines
3.9 KiB
XML
107 lines
3.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Scheme
|
|
LastUpgradeVersion = "1500"
|
|
version = "1.7">
|
|
<BuildAction
|
|
parallelizeBuildables = "YES"
|
|
buildImplicitDependencies = "YES"
|
|
runPostActionsOnFailure = "NO">
|
|
<BuildActionEntries>
|
|
<BuildActionEntry
|
|
buildForTesting = "YES"
|
|
buildForRunning = "YES"
|
|
buildForProfiling = "YES"
|
|
buildForArchiving = "YES"
|
|
buildForAnalyzing = "YES">
|
|
<BuildableReference
|
|
BuildableIdentifier = "primary"
|
|
BlueprintIdentifier = "297C0C2BFBA10AB52D5D49CE"
|
|
BuildableName = "KisaniCal.app"
|
|
BlueprintName = "KisaniCal"
|
|
ReferencedContainer = "container:KisaniCal.xcodeproj">
|
|
</BuildableReference>
|
|
</BuildActionEntry>
|
|
</BuildActionEntries>
|
|
</BuildAction>
|
|
<TestAction
|
|
buildConfiguration = "Debug"
|
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
onlyGenerateCoverageForSpecifiedTargets = "NO">
|
|
<MacroExpansion>
|
|
<BuildableReference
|
|
BuildableIdentifier = "primary"
|
|
BlueprintIdentifier = "297C0C2BFBA10AB52D5D49CE"
|
|
BuildableName = "KisaniCal.app"
|
|
BlueprintName = "KisaniCal"
|
|
ReferencedContainer = "container:KisaniCal.xcodeproj">
|
|
</BuildableReference>
|
|
</MacroExpansion>
|
|
<Testables>
|
|
<TestableReference
|
|
skipped = "NO"
|
|
parallelizable = "NO">
|
|
<BuildableReference
|
|
BuildableIdentifier = "primary"
|
|
BlueprintIdentifier = "75535A64153951A3C35F75FC"
|
|
BuildableName = "KisaniCalTests.xctest"
|
|
BlueprintName = "KisaniCalTests"
|
|
ReferencedContainer = "container:KisaniCal.xcodeproj">
|
|
</BuildableReference>
|
|
</TestableReference>
|
|
</Testables>
|
|
<CommandLineArguments>
|
|
</CommandLineArguments>
|
|
</TestAction>
|
|
<LaunchAction
|
|
buildConfiguration = "Debug"
|
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
launchStyle = "0"
|
|
useCustomWorkingDirectory = "NO"
|
|
ignoresPersistentStateOnLaunch = "NO"
|
|
debugDocumentVersioning = "YES"
|
|
debugServiceExtension = "internal"
|
|
allowLocationSimulation = "YES">
|
|
<BuildableProductRunnable
|
|
runnableDebuggingMode = "0">
|
|
<BuildableReference
|
|
BuildableIdentifier = "primary"
|
|
BlueprintIdentifier = "297C0C2BFBA10AB52D5D49CE"
|
|
BuildableName = "KisaniCal.app"
|
|
BlueprintName = "KisaniCal"
|
|
ReferencedContainer = "container:KisaniCal.xcodeproj">
|
|
</BuildableReference>
|
|
</BuildableProductRunnable>
|
|
<CommandLineArguments>
|
|
</CommandLineArguments>
|
|
</LaunchAction>
|
|
<ProfileAction
|
|
buildConfiguration = "Release"
|
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
savedToolIdentifier = ""
|
|
useCustomWorkingDirectory = "NO"
|
|
debugDocumentVersioning = "YES">
|
|
<BuildableProductRunnable
|
|
runnableDebuggingMode = "0">
|
|
<BuildableReference
|
|
BuildableIdentifier = "primary"
|
|
BlueprintIdentifier = "297C0C2BFBA10AB52D5D49CE"
|
|
BuildableName = "KisaniCal.app"
|
|
BlueprintName = "KisaniCal"
|
|
ReferencedContainer = "container:KisaniCal.xcodeproj">
|
|
</BuildableReference>
|
|
</BuildableProductRunnable>
|
|
<CommandLineArguments>
|
|
</CommandLineArguments>
|
|
</ProfileAction>
|
|
<AnalyzeAction
|
|
buildConfiguration = "Debug">
|
|
</AnalyzeAction>
|
|
<ArchiveAction
|
|
buildConfiguration = "Release"
|
|
revealArchiveInOrganizer = "YES">
|
|
</ArchiveAction>
|
|
</Scheme>
|