Redirect website between two specific dates using javascript

Hi everyone!

I’m in need of some help regarding redirecting my website during certain days each year. I want to be able to redirect my website from the current one (A) to the other one (B) between 1st of march to 15th of april. I can’t find any way to do this without making a wierd cluster of websites that loads and redirect the user back and forth to multiple pages. I tried to add certain code in the script and such but no success. I’m trying also to not include a specific year only the dates so it runs same dates each year without modification. The code I use today for the season is:

<script>var date=new Date();
if(date.getMonth()==3){
  window.location="https://www.MYWEBSITE.com/site_B.html"}</script>

wich only redirects the full months of april wich is’nt optimal at all. All ideas are welcome and I appreciate all help 🙂