Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Working Hours: 40 points - Is this within working hours for all participants? ScoreWorkingHoursMax = 40.0 // Time Quality: 25 points - How good is this time for participants? // - 9-11 AM: Excellent (25 points) // - 11 AM-2 PM: Good (20 points) // - 2-5 PM: Fair (15 points) // - 8-9 AM or 5-6 PM: Poor (10 points) // - Outside working hours: 0 points ScoreTimeQualityMax = 25.0 // Cultural Considerations: 15 points - Respects cultural norms // - No Friday PM meetings (end > 3pm) for some cultures // - No lunch hour meetings (12-1pm) // - No Monday early AM (before 10am) ScoreCulturalMax = 15.0 // Weekday Preference: 10 points // - Tuesday/Wednesday: 10 points (best) // - Monday/Thursday: 8 points // - Friday: 5 points ScoreWeekdayMax = 10.0 // Holiday Check: 10 points // - No holidays: 10 points // - Holiday for some: 5 points // - Holiday for all: 0 points ScoreHolidayMax = 10.0 )
Scoring weights for the 100-point scoring algorithm
Variables ¶
This section is empty.
Functions ¶
func GetQualityLabel ¶
GetQualityLabel returns a human-readable quality label for a time.
func GetScoreColor ¶
GetScoreColor returns a color indicator based on the total score.
Types ¶
type ParticipantTime ¶
type ParticipantTime struct {
TimeZone string
LocalTime time.Time
IsWorking bool
Quality string // "Excellent", "Good", "Fair", "Poor", "Bad"
QualityIcon string // "✨", "", "⚠️", "🔴"
}
ParticipantTime represents a participant's local time for a meeting slot.
type ScoreBreakdown ¶
type ScoreBreakdown struct {
WorkingHours float64 // 0-40 points
TimeQuality float64 // 0-25 points
Cultural float64 // 0-15 points
Weekday float64 // 0-10 points
Holiday float64 // 0-10 points
Total float64 // Sum of all (0-100)
}
ScoreBreakdown shows detailed scoring for transparency.
func ScoreTimeSlot ¶
func ScoreTimeSlot(startTime, endTime time.Time, participants []ParticipantTime) ScoreBreakdown
ScoreTimeSlot calculates a 100-point score for a given time slot.
Click to show internal directories.
Click to hide internal directories.