janrg / MeeusSunMoon

JavaScript module to calculate times for sunrise, solar noon, and sunset, as well as moon phases based on "Astronomical Algorithms" by Jean Meeus
MIT License
31 stars 9 forks source link

npm / Mocha #12

Closed brettz9 closed 4 years ago

brettz9 commented 4 years ago

Sorry, just noticed the delay flag being duplicated, and also went ahead to do devDep. updates (which replaces the need for your other automated PR).

Btw, I noticed that the sunset and other functions make calls like sunTimes.returnPNMS(err, datetime, 19, 30); with err as the first argument, but that seems odd if not mistaken with returnPNMS showing its first argument as returnDate. Was that deliberate?

Btw, whenever you may be ready for a new release of MSM, I can submit my BadiDate PR as well.

janrg commented 4 years ago

err as first argument is correct, the code actually throws a "tagged" moment object. Looks like our commits overlapped so I just removed the duplicated flag myself as this PR had merge conflicts.