Skip to content

Commit

Permalink
coin2html: round Min/MaxDate to year ends
Browse files Browse the repository at this point in the history
  • Loading branch information
mkobetic committed Apr 4, 2024
1 parent a2c3069 commit 808a87c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/coin2html/js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ function loadAccounts() {
const posting = new Posting(transaction, account, quantity, balance, impPosting.balance_asserted, impPosting.notes, impPosting.tags);
}
}
MinDate = new Date(MinDate.getFullYear(), 0, 1);
MaxDate = new Date(MaxDate.getFullYear(), 11, 31);
}
function loadEverything() {
loadCommodities();
Expand Down
2 changes: 2 additions & 0 deletions cmd/coin2html/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ function loadAccounts() {
);
}
}
MinDate = new Date(MinDate.getFullYear(), 0, 1);
MaxDate = new Date(MaxDate.getFullYear(), 11, 31);
}

function loadEverything() {
Expand Down
2 changes: 2 additions & 0 deletions examples/yearly/viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46584,6 +46584,8 @@ <h1>
const posting = new Posting(transaction, account, quantity, balance, impPosting.balance_asserted, impPosting.notes, impPosting.tags);
}
}
MinDate = new Date(MinDate.getFullYear(), 0, 1);
MaxDate = new Date(MaxDate.getFullYear(), 11, 31);
}
function loadEverything() {
loadCommodities();
Expand Down

0 comments on commit 808a87c

Please sign in to comment.