Open hugy718 opened 1 year ago
The current age calculation for week/month/year is based on translation to the fixed day interval: https://github.com/COOL-cohort/COOL/blob/80070ff893b3101fe8c4f53f531ffc179e6026b3/cool-core/src/main/java/com/nus/cool/core/cohort/utils/DateUtils.java#L70-L75
Needs to use the date object to generate the difference directly and add tests to cover these cases.
This is related to issue #134, PR #135
Problem
The current age calculation for week/month/year is based on translation to the fixed day interval: https://github.com/COOL-cohort/COOL/blob/80070ff893b3101fe8c4f53f531ffc179e6026b3/cool-core/src/main/java/com/nus/cool/core/cohort/utils/DateUtils.java#L70-L75
Needs to use the date object to generate the difference directly and add tests to cover these cases.
This is related to issue #134, PR #135