Skip to content

Commit

Permalink
Rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTurk247 committed Apr 10, 2024
1 parent 79449b2 commit 2fb7c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PAWS/Study Information/EnrollmentGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class EnrollmentGroup: Module, EnvironmentAccessible {
var studyType: StudyType? {
guard let enrollmentDate = Auth.auth().currentUser?.metadata.creationDate,
let dateOfBirth,
let ageYears = Calendar.current.dateComponents([.year], from: dateOfBirth, to: enrollmentDate).year else {
let yearsOfAge = Calendar.current.dateComponents([.year], from: dateOfBirth, to: enrollmentDate).year else {
return nil
}
return ageYears >= 18 ? .adult : .pediatric
return yearsOfAge >= 18 ? .adult : .pediatric
}

init() { }
Expand Down

0 comments on commit 2fb7c40

Please sign in to comment.