+
Skip to content

Adding some specific time #166

Open
Open
@ysnshn

Description

@ysnshn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载