Skip to content

Commit

Permalink
Default report start date to year ago and end to tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpp committed Dec 23, 2024
1 parent 7ddd89e commit 42b2244
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webroot/html/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ <h5 class="titleHeader">

<script>
window.addEventListener("load", () => {
const oneYearAgo = new Date(Date.now() - (365 * 24 * 60 * 60 * 1000));
const now = new Date();
const tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1)
const oneYearAgo = new Date(now.getFullYear() - 1, now.getMonth(), now.getDate())
const tzOffset = now.getTimezoneOffset() * 60 * 1000;

document.querySelector("#export-start-date").value = oneYearAgo.toISOString().slice(0,10);
Expand Down

0 comments on commit 42b2244

Please sign in to comment.