Skip to content

Commit

Permalink
Merge pull request #108 from jd1378/develop
Browse files Browse the repository at this point in the history
expose sunset in prayerTimes (ts)
  • Loading branch information
z3bi authored May 11, 2022
2 parents 044d46e + 05a0c34 commit 101192a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/PrayerTimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default class PrayerTimes {
sunrise: Date;
dhuhr: Date;
asr: Date;
sunset: Date;
maghrib: Date;
isha: Date;

Expand All @@ -39,6 +40,7 @@ export default class PrayerTimes {
let sunriseTime: Date;
let dhuhrTime: Date;
let asrTime: Date;
let sunsetTime: Date;
let maghribTime: Date;
let ishaTime: Date;

Expand All @@ -54,7 +56,7 @@ export default class PrayerTimes {
date.getMonth(),
date.getDate(),
);
let sunsetTime = new TimeComponents(solarTime.sunset).utcDate(
sunsetTime = new TimeComponents(solarTime.sunset).utcDate(
date.getFullYear(),
date.getMonth(),
date.getDate(),
Expand Down Expand Up @@ -220,6 +222,7 @@ export default class PrayerTimes {
dateByAddingMinutes(asrTime, asrAdjustment),
calculationParameters.rounding,
);
this.sunset = roundedMinute(sunsetTime, calculationParameters.rounding);
this.maghrib = roundedMinute(
dateByAddingMinutes(maghribTime, maghribAdjustment),
calculationParameters.rounding,
Expand Down

0 comments on commit 101192a

Please sign in to comment.