Skip to content

Commit

Permalink
BİSMİLLAHİRRAHMANİRRAHİM dates fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Yusuf-YENICERI committed Dec 17, 2024
1 parent 115c421 commit ad58b1d
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,24 @@ const getCurrentIndexV3 = hatims => {
};

const getMonths3Date = () => {
const data = dataMonths3[new Date ().getFullYear ()];
let data = dataMonths3[new Date ().getFullYear ()];

if (data.double) {
let endOfYear = new Date (data.startingDate2);
endOfYear.setDate (endOfYear.getDate () + 90);

if (new Date () > endOfYear) {
data = dataMonths3[new Date ().getFullYear () + 1];
}
} else {
let endOfYear = new Date (data.startingDate);
endOfYear.setDate (endOfYear.getDate () + 90);

if (new Date () > endOfYear) {
data = dataMonths3[new Date ().getFullYear () + 1];
}
}

if (data.double) {
if (new Date () < new Date (data.startingDate2)) {
data.chosen = 1;
Expand Down

0 comments on commit ad58b1d

Please sign in to comment.