Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,16 @@ export function inferMemberOrganizationStintChanges(
return false
}

// Wide umbrella orgs that fully wrap the neighbor are concurrent, not career breaks
if (s.dateStart <= neighbor.dateStart && s.dateEnd >= neighbor.dateEnd) {
return false
}

const overlapStart = s.dateStart > gapStart ? s.dateStart : gapStart
const overlapEnd = s.dateEnd < gapEnd ? s.dateEnd : gapEnd
if (overlapStart >= overlapEnd) return false

// Pre-existing orgs that wrap the neighbor naturally have gap presence just by existing,
// so require 90d (vs 30d) of exclusive gap overlap to count as a real career break.
const isUmbrella = s.dateStart <= neighbor.dateStart && s.dateEnd >= neighbor.dateEnd
const threshold = isUmbrella ? 90 : 30

return overlapStart < overlapEnd && diff(overlapStart, overlapEnd) > 30
return diff(overlapStart, overlapEnd) > threshold
Comment thread
skwowet marked this conversation as resolved.
Outdated
})

if (hasSeparator) {
Expand Down
Loading