diff --git a/src/App.svelte b/src/App.svelte index 86799cc..af0b382 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -76,11 +76,16 @@ } function get_rasp() { - const startDate = `${start_date.getDate()}.${start_date.getMonth() + 1}.${start_date.getFullYear()}`; + const s_date = start_date.getDate(); + const s_month = start_date.getMonth() + 1; + const startDate = `${s_date < 10 ? 0 : ""}${s_date}.${s_month < 10 ? 0 : ""}${s_month}.${start_date.getFullYear()}`; end_date = new Date(start_date); end_date.setDate(start_date.getDate() + 6); end_date.setHours(23, 59, 59, 999); - const endDate = `${end_date.getDate()}.${end_date.getMonth() + 1}.${end_date.getFullYear()}`; + + const e_date = end_date.getDate(); + const e_month = end_date.getMonth() + 1; + const endDate = `${e_date < 10 ? 0 : ""}${e_date}.${e_month < 10 ? 0 : ""}${e_month}.${end_date.getFullYear()}`; const date_full = `${startDate}-${endDate}`; @@ -208,7 +213,7 @@ class="p-2 flex justify-between items-center {i === data.saved.length - 1 ? '' : 'border-b-2'} - border-[var(--w-border)] dark:border-[var(--b-border)]" + border-[var(--w-border)] dark:border-[var(--b-border)]" >
{info.name}
@@ -232,8 +237,8 @@