This commit is contained in:
2024-03-07 18:22:31 +01:00
parent 21a9e9e981
commit c6771ef74d
4 changed files with 31 additions and 11 deletions

View File

@@ -3,6 +3,10 @@ import { Ref, ref } from "vue";
const localStorageKey = 'entries'
export function getDifferenceToToday(date: Moment) {
return Math.abs(date.diff(moment(), 'days'))
}
export const entries: Ref<Entry[]> = ref(parseFromPossibleString(localStorage.getItem(localStorageKey)))
export interface Entry {