improves functions and stats are displayed in a nicer format

This commit is contained in:
tina
2018-08-09 14:02:17 +02:00
parent 6135c92268
commit c99aa7509d
3 changed files with 1533 additions and 1526 deletions
+7 -11
View File
@@ -133,17 +133,13 @@ export default function config(opts) {
function getAllMensesStarts(day, collectedDates) {
day = day || LocalDate.now().toString()
collectedDates = collectedDates || []
if (!day) {
return null
const lastStart = getLastMensesStart(day)
if (!lastStart) {
return collectedDates
} else {
const lastStart = getLastMensesStart(day)
if (!lastStart) {
return collectedDates
} else {
const newDay = LocalDate.parse(lastStart.date).minusDays(1).toString()
collectedDates.push(lastStart.date)
return getAllMensesStarts(newDay, collectedDates)
}
const newDay = LocalDate.parse(lastStart.date).minusDays(1).toString()
collectedDates.push(lastStart.date)
return getAllMensesStarts(newDay, collectedDates)
}
}
@@ -151,7 +147,7 @@ export default function config(opts) {
getCycleDayNumber,
getCycleForDay,
getPreviousCycle,
getLastMensesStart,
getCyclesBefore,
getAllMensesStarts
}
}