Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
calcTimes() {
let coordinates = new adhan.Coordinates(this.state.lat, this.state.lon)
let today = new Date()
let tomorrow = new Date()
tomorrow.setDate(today.getDate()+1)
var params = adhan.CalculationMethod.MoonsightingCommittee()
let prayerTimesToday = new adhan.PrayerTimes(coordinates, today, params)
let prayerTimesTomorrow = new adhan.PrayerTimes(coordinates, tomorrow, params)
console.log(prayerTimesTomorrow)
let maghrib = dayjs(prayerTimesToday.maghrib)
let fajr = dayjs(prayerTimesTomorrow.fajr)
console.log(maghrib)
console.log(fajr)
let interval = fajr.diff(maghrib, 'millisecond') / 6
console.log(interval)
let times = []