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

Adding some specific time #166

Open
ysnshn opened this issue Feb 24, 2023 · 2 comments
Open

Adding some specific time #166

ysnshn opened this issue Feb 24, 2023 · 2 comments

Comments

@ysnshn
Copy link

ysnshn commented Feb 24, 2023

Hello Vladimir, thank you for this great tool actually,

I would ask if you could direct me to calculate some specific time, for afternoon prayer, which is the middle of noon (solarNoon, Jnoon) and sunset (Jset).

I tried many code combinations but couldn't get through so far.

Some of the things that I tried:

  • Tried to add times with a degree, I achieved one but not the afternoon one,

var times = SunCalc.times = [
[-0.833, 'sunrise', 'sunset' ],
[ -0.3, 'sunriseEnd', 'sunsetStart' ],
[ -6, 'dawn', 'dusk' ],
[ -9, 'imsak', 'isha' ],
[ -12, 'nauticalDawn', 'nauticalDusk'],
[ -18, 'nightEnd', 'night' ],
// [ -21, 'asr1', 'asr'],
[ 6, 'goldenHourEnd', 'goldenHour' ]
];

4th line with degree 9 worked but not the commented-out one, I tried many degrees,

  • Tried to add in the result attached:

var result = {
  solarNoon: fromJulian(Jnoon),
  nadir: fromJulian(Jnoon - 0.5), 

--> asr: fromJulian(Jnoon * 0.2) or fromJulian ((Jset - Jnoon) / 2), etc.
};

  • Tried to add in the "for loop":

like, asr = fromJulian(Jset - Jnoon) /2;
and also in the result like: result[time[3]] = fromJulian(asr);

Could you please help how I could achieve this,

Thank you.

@ysnshn
Copy link
Author

ysnshn commented Mar 12, 2023

in simple writing: how to get a mid-time calculation of two other sun positions, noon and sunset?

@ysnshn
Copy link
Author

ysnshn commented Apr 6, 2023

no one?

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

No branches or pull requests

1 participant