batoulapps / adhan-js

High precision Islamic prayer time library for JavaScript
MIT License
368 stars 81 forks source link

add adjustment settings to sunset #152

Closed meypod closed 1 year ago

meypod commented 1 year ago

Hi currently its not possible to adjust sunset time some of my app's users need to adjust all of the times by around 1 hour because of the DST problems

can we have this option like we have for other times ?

z3bi commented 1 year ago

You want to adjust sunset separately from Maghrib? We don't return a sunset time, just a Maghrib time. Can you explain what is the issue you're trying to solve?

meypod commented 1 year ago

I'm very sure you do return a sunset time, because I'm using it, maybe it was added at some point ?

meypod commented 1 year ago

and I think I have explained why I need to adjust it, and it's the only remaining time that I cannot adjust

z3bi commented 1 year ago

You're right we do return a sunset time. However this was done as a convenience in case you needed to access it and is not part of the standard prayers we return. I am hesitant to include support in other things like being part of adjustments.

meypod commented 1 year ago

I don't see why not given it needs only 2-4 lines of code to support like the other times it support

And there's no pressure to do so, I can patch my packages locally to do what I need them to do But I thought since the other times are there, it would be nice for this one to have as well (i have found a need, some one else may do as well)

meypod commented 1 year ago

maybe add it but also add a jsdoc to the sunset time and mention that while It's available It's not what people should normally be using ? if that's what you mean