Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
nextNewMoon (jde) {
let nm = this.midnight(moonphase.newMoon(toYear(jde)))
let cnt = 0
while (nm < jde && cnt++ < 4) {
nm = this.midnight(moonphase.newMoon(toYear(jde + cnt * lunarOffset)))
}
return nm
}
previousNewMoon (jde) {
let nm = this.midnight(moonphase.newMoon(toYear(jde)))
let cnt = 0
while (nm > jde && cnt++ < 4) {
nm = this.midnight(moonphase.newMoon(toYear(jde - cnt * lunarOffset)))
}
return nm
}
previousNewMoon (jde) {
let nm = this.midnight(moonphase.newMoon(toYear(jde)))
let cnt = 0
while (nm > jde && cnt++ < 4) {
nm = this.midnight(moonphase.newMoon(toYear(jde - cnt * lunarOffset)))
}
return nm
}