Skip to content

Make category calculation clearer and safer with a small struct/helper #19

@edunzer

Description

@edunzer

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions