Skip to content

Commit

Permalink
[Candidate] Fix wrong comments to avoid confusion in future (#8791)
Browse files Browse the repository at this point in the history
The middle day of the month is used when date format is Y-M, not the first.
  • Loading branch information
zaliqarosli committed Jun 15, 2023
1 parent e2ef3ab commit c2a9c20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/libraries/Candidate.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource,
);
}

// Add day as first of the month if Y-m dob format
// Add day as mid of the month if Y-m dob format
// This allows insert into sql candidate table
if ($dobFormat === '!Y-m') {
$edc .= '-15';
Expand All @@ -316,7 +316,7 @@ class Candidate implements \LORIS\StudyEntities\AccessibleResource,
);
}

// Add day as first of the month if Y-m dob format
// Add day as mid of the month if Y-m dob format
// This allows insert into sql candidate table
if ($dobFormat === '!Y-m') {
$dateOfBirth .= '-15';
Expand Down

0 comments on commit c2a9c20

Please # to comment.