Skip to content

Commit

Permalink
Get week offset
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Oct 14, 2023
1 parent 8d0f6e6 commit e838975
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions web/js/countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_unviewed[i].debt.date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand All @@ -286,7 +286,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_won[i].date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand All @@ -308,7 +308,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_unpaid[i].date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand Down
8 changes: 4 additions & 4 deletions web/js/registergoal.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_unviewed[i].debt.date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand All @@ -264,7 +264,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_won[i].date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand All @@ -286,7 +286,7 @@ function placeDebtOverview(overviewArray) {
var date_str = ""
try {
var date = new Date(overviewArray.debt_unpaid[i].date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand All @@ -310,7 +310,7 @@ function placeDebtSpin(overview) {
var date_str = ""
try {
var date = new Date(overview.debt_lost[0].date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
var date_str = date_week + " (" + date_year + ")"
} catch {
Expand Down
2 changes: 1 addition & 1 deletion web/js/wheel.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function get_debt(debt_id) {
var date_str = ""
try {
var date = new Date(result.debt.date);
var date_week = date.GetWeek();
var date_week = date.getWeek(1);
var date_year = date.getFullYear();
date_str = date_week + " (" + date_year + ")"
} catch {
Expand Down

0 comments on commit e838975

Please sign in to comment.