Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
case 'june': {
jde = solstice.june2(year, earth)
break
}
case 'september': {
jde = solstice.september2(year, earth)
break
}
case 'december': {
jde = solstice.december2(year, earth)
break
}
}
const str = new julian.Calendar().fromJDE(jde).toDate().toISOString()
let date
if (/^[+-]\d{2}:\d{2}?$/.test(this._timezone)) { // for '+08:00' formats
date = moment(str).utcOffset(this._timezone)
} else { // for 'Asia/Shanghai' formats
date = moment(str).tz(this._timezone) // move to timezone
}
const floorDate = {
year: year,
month: date.month() + 1,
day: date.date()
}
const d = new CalDate(floorDate).setOffset(this.offset)
this.dates.push(d)
return this