refactor: generalize shift display from Wednesday to any day
Updated the shift display logic to accommodate shifts on any day of the week instead of just Wednesday. Renamed components and functions for clarity, and adjusted the README to reflect these changes. Enhanced tests to ensure proper functionality across all days.
This commit is contained in:
1 parent
a0fa56202e
commit
096d1a2b9f
4 files changed
+24
-23
No files matched your search
+1
-3
@@ -3,9 +3,7 @@ import type Database from 'better-sqlite3';
|
||||
import { isWithinSignupWindow } from './signup-window.js';
|
||||
import { formatInstantInZone, localToUtc, todayInZone } from './time.js';
|
||||
|
||||
/** Weekday 0 is Sunday, matching the zoned clock. The public sign-up cards use Wednesday. */
|
||||
export const WEDNESDAY = 3;
|
||||
|
||||
/** Weekday 0 is Sunday, matching the zoned clock. */
|
||||
const WEEKDAY_LABELS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] as const;
|
||||
|
||||
export type PublicShift = {
|
||||
|
||||
Reference in new issue
Block a user