mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
Added PWA support (#40)
This commit is contained in:
10
lib/utils.ts
10
lib/utils.ts
@@ -83,6 +83,16 @@ export function getCompletionsForDate({
|
||||
).length
|
||||
}
|
||||
|
||||
export function getCompletionsForToday({
|
||||
habit,
|
||||
timezone
|
||||
}: {
|
||||
habit: Habit,
|
||||
timezone: string
|
||||
}): number {
|
||||
return getCompletionsForDate({ habit, date: getTodayInTimezone(timezone), timezone })
|
||||
}
|
||||
|
||||
export function getCompletedHabitsForDate({
|
||||
habits,
|
||||
date,
|
||||
|
||||
Reference in New Issue
Block a user