Default display to last month

Since we pay bills for the last month in the current month...
This commit is contained in:
2024-08-19 14:34:47 +02:00
parent 236b113c10
commit 3ca12139cd

View File

@@ -4,7 +4,8 @@ import { type Writable, writable } from "svelte/store";
async function createStore(): Promise<Writable<ScrollingTimeframe> & { next: Function; prev: Function }> {
const thism = new Date();
const lastm = new Date();
lastm.setMonth(thism.getMonth() - 1);
thism.setMonth(thism.getMonth() - 1);
lastm.setMonth(lastm.getMonth() - 2);
const { subscribe, update, set } = writable({ from: lastm, to: thism });
return {