improves functions and stats are displayed in a nicer format
This commit is contained in:
+7
-11
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user