Default scrolling payment date to first of month

This commit is contained in:
2024-08-31 11:59:57 +02:00
parent e83fb7abb8
commit f1c8c394c9

View File

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