Git Product home page Git Product logo

prayer-times's People

Contributors

stankovski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prayer-times's Issues

NightPortion method returns 0 for angle based rule calculations

Asalamu alaikum wa rahmatullahi wa barakatu akhi,

The line :
if (this.HighLatitudeAdjustmentMethod == HighLatitudeAdjustmentMethods.AngleBased)
return 1 / 60 * angle;

Should be :
if (this.HighLatitudeAdjustmentMethod == HighLatitudeAdjustmentMethods.AngleBased)
return 1d / 60d * angle;

Without this, the fraction returns 0 ( as it does integer division and returns a whole number), by setting the values to doubles a fraction is returned and angle based calculations work correctly.

Jazakallahu khairan for your good work.

Nad

issue

Salam aleykum
Please check the "EffectiveTimeZone()" in "PrayerTimesCalculator"
it should be like that

private int EffectiveTimeZone(DateTimeOffset date, int? timeZone)
        {
            if (timeZone == null)
                timeZone = date.Offset.Hours;

            int dstOffset = 0;
            if (date.LocalDateTime.IsDaylightSavingTime())
            {
                dstOffset = -1;
            }

            return timeZone.Value - dstOffset;
        }

CalculationMethods.Custom pointless

CalculationMethods.Custom can be used, but the values for this are hard-coded and the same as the Muslim World League, making it useless. Additional properties should be used to allow any custom angles to be used.

Manchester UK Error

try this test..

        PrayerTimesCalculator calc = new PrayerTimesCalculator(53.4794892, -2.2451148);
        calc.CalculationMethod = CalculationMethods.MWL;
        calc.AsrJurusticMethod = AsrJuristicMethods.Shafii;
        var times = calc.GetPrayerTimes(new DateTime(2020, 5, 14), 1);

it will return NaN for FAJR time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.