Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Time Between Classes] Flatten timed meetings for gap rules

Open
#781 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
85/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
backend, testing

Research direction

Read src/lib/generation/rule.ts and src/lib/generation/noConflicts.ts, then follow the shape of preferredTimeWindow.ts and its test. Implement the rule in src/lib/generation/rules/minGap.ts, cover the listed gap and weekday cases in minGap.test.ts, and register it in src/lib/generation/registry.ts. Run pnpm test; done means all acceptance checks pass and describe() explains the minimum gap.

Written by the indexing model from the issue text.

Description

Algorithm time-gaps

What to build

Prepare class meeting times for the new “time between classes” filters. Build a helper that lists each timed meeting separately and converts its clock times to minutes, while skipping meetings whose times are unknown.

Files

Steps

  1. Add flattenTimedMeetings and the TimedMeeting type in gaps.ts. The result fields are crn, meetingIndex, days, startMinutes, endMinutes and dateRange.
  2. Visit each section’s meetings. Skip a meeting if startTime or endTime is null; otherwise split each HH:mm[:ss] time and calculate hours * 60 + minutes.
  3. Keep separate entries for separate meetings. Copy the section’s dateRange and the meeting’s weekday list unchanged; use its position in section.meetings as meetingIndex.

Example

A meeting from 09:00 to 09:50 becomes startMinutes=540 and endMinutes=590. A second meeting with no time is omitted; two timed meetings in one section remain two separate entries.

import type { DayOfWeek, DateRange } from "~/lib/domain/section";
export type TimedMeeting = { crn: number; meetingIndex: number; days: DayOfWeek[]; startMinutes: number; endMinutes: number; dateRange: DateRange | null };

Check it works

In src/lib/generation/gaps.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/lib/generation/gaps.test.ts, pnpm lint and pnpm typecheck.

References

Assign yourself before starting, or comment to claim the issue. Project setup.

Dominant language
TypeScript
Stars
19
Forks
94
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DevDogsUGA/DogDays

All issues in DevDogsUGA/DogDays

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.