Fixed streak not using local time
This commit is contained in:
parent
a909aee7a1
commit
2c349422e3
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@
|
||||||
let classes = ["bi"]
|
let classes = ["bi"]
|
||||||
|
|
||||||
const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000);
|
const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000);
|
||||||
const formattedDate = adjustedDate.toISOString().split('T')[0];
|
const formattedDate = adjustedDate.getFullYear().toString() + "-" + (adjustedDate.getMonth() + 1).toString().padStart(2, "0") + "-" + adjustedDate.getDate().toString().padStart(2, "0");
|
||||||
|
|
||||||
if (streakData.length > 0) {
|
if (streakData.length > 0) {
|
||||||
if (streakData.includes(formattedDate)) {
|
if (streakData.includes(formattedDate)) {
|
||||||
|
|
Loading…
Reference in a new issue