Skip to content

Commit

Permalink
meningkatkan akurasi waktu sholat sesuai KEMENAG & update deteksi exp…
Browse files Browse the repository at this point in the history
…ired
  • Loading branch information
renomureza committed Apr 11, 2021
1 parent 98e71d0 commit 007d1df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions ramadhan/js/ramadhanTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ const currentDate = () => {
}).format(new Date());
};

currentDate();
currentTime();

// Pray Time
prayTimes.adjust({ imsak: "10 min", fajr: 20, asr: "Standard", isha: 18 });
prayTimes.tune({
imsak: 2.5,
fajr: 2.5,
dhuhr: 3.5,
asr: 2,
maghrib: 3.5,
isha: 2.5,
});

const prayTimesResult = prayTimes.getTimes(new Date(), [
config.prayTime.latitude || -6.1783056,
config.prayTime.longtitude || 106.6318889,
Expand All @@ -43,4 +50,6 @@ const insertPrayerTime = () => {
});
};

currentDate();
currentTime();
insertPrayerTime();
3 changes: 2 additions & 1 deletion ramadhan/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ <h1>Status</h1>
})
.then(result=> {
const { comment } = result.data;
expiredTable.innerHTML = comment
const expiredTime = (comment.match(/[\/]/g) || []).length === 2 ? comment : '-';
expiredTable.innerHTML = expiredTime;
})
.catch(error => {
expiredTable.innerHTML = error.message;
Expand Down

0 comments on commit 007d1df

Please sign in to comment.