Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Isha for Um-Alqura in Ramadan #1

Open
laplace opened this issue Jun 24, 2015 · 1 comment
Open

Adjust Isha for Um-Alqura in Ramadan #1

laplace opened this issue Jun 24, 2015 · 1 comment

Comments

@laplace
Copy link

laplace commented Jun 24, 2015

In Saudi Arabia, Isha in Ramadan is adjusted to be Maghrib + 2 Hours, I suggest modifying the following part in adjustTimes

    // Adjust Isha
    let cal = NSCalendar(calendarIdentifier: NSCalendarIdentifierIslamicUmmAlQura)
    let month = cal?.component(.CalendarUnitMonth, fromDate: NSDate())
    //If Makkah and Ramadan, the Isha is Maghrib+2.0
    if (self.calculationMethod == .Makkah && month == 9)
    {
        if (!ttimes[TimeNames.Maghrib]!.isNaN){
            ttimes[TimeNames.Isha] = ttimes[TimeNames.Maghrib]! + 2.0
        }
    }
    else {
        if params[3] == 1 { // Isha
            dTime2 = ttimes[TimeNames.Maghrib]! + Double(params[4] / 60.0)
            ttimes[TimeNames.Isha] = dTime2
        }
    }
@ashikahmad
Copy link
Owner

Thanks, for your awesome suggestion. I will love to fit this sort of things configurable rather than hard-coding in core. So that people can simply set or toggle some properties to have or ignore this type of special cases. In-Sha-Allah, I'll give some effort on this when I get some free time.
Thanks again, for your concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants