Adds comment for bleeding prediction ranges
This commit is contained in:
@@ -182,6 +182,7 @@ export default class Home extends Component {
|
|||||||
function getTimes(prediction) {
|
function getTimes(prediction) {
|
||||||
const todayDate = LocalDate.now()
|
const todayDate = LocalDate.now()
|
||||||
const predictedBleedingStart = LocalDate.parse(prediction[0][0])
|
const predictedBleedingStart = LocalDate.parse(prediction[0][0])
|
||||||
|
/* the range of predicted bleeding days can be either 3 or 5 */
|
||||||
const predictedBleedingEnd = LocalDate.parse(prediction[0][ prediction[0].length - 1 ])
|
const predictedBleedingEnd = LocalDate.parse(prediction[0][ prediction[0].length - 1 ])
|
||||||
const daysToEnd = todayDate.until(predictedBleedingEnd, ChronoUnit.DAYS)
|
const daysToEnd = todayDate.until(predictedBleedingEnd, ChronoUnit.DAYS)
|
||||||
return { todayDate, predictedBleedingStart, predictedBleedingEnd, daysToEnd }
|
return { todayDate, predictedBleedingStart, predictedBleedingEnd, daysToEnd }
|
||||||
|
|||||||
Reference in New Issue
Block a user