Category date-range computation is verbose and error-prone. Validity and trimming logic are repeated.
How to fix: Create a small internal helper class like:
CategoryWindow(name, start, end, pct, usableDays, hoursPerDay)
and build a list for cat1/cat2/cat3/post, then loop to compute days/hours/exceptions. This will shrink code and reduce mistakes.
File: ScheduleHoursDistributor.cls (generateCategoryScheduleExceptions)