Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
inYear (year) {
let jde
switch (this._season) {
case 'march': {
jde = solstice.march2(year, earth)
break
}
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)