Fixes prediction range in drop on homescreen
This commit is contained in:
+7
-1
@@ -217,5 +217,11 @@ function getBleedingPredictionRange(prediction) {
|
|||||||
if (todayDate.isAfter(bleedingEnd)) {
|
if (todayDate.isAfter(bleedingEnd)) {
|
||||||
return labels.unknown
|
return labels.unknown
|
||||||
}
|
}
|
||||||
return '0'
|
const daysToEnd = todayDate.until(bleedingEnd, ChronoUnit.DAYS)
|
||||||
|
if (daysToEnd === 0) {
|
||||||
|
return '0'
|
||||||
|
} else {
|
||||||
|
return `0 - ${daysToEnd}`
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user