Date falling into the interval

Let there be three intervals: from January 1st to March 8th, from March 9th to June 17th, from June 18th to December 31st. Suppose we also have some date containing month and day. Let's determine what period this date falls into:

let date = '08-20'; if (date >= '01-01' && date <= '03-08') { console.log('1st interval'); } if (date >= '03-09' && date <= '06-17') { console.log('2d interval'); } if (date >= '06-18' && date <= '12-31') { console.log('3d interval'); }

Given a date containing the month and day. Determine the zodiac sign that this date falls on.

enru