Assignment1 part1

Check if today's my birthday, or check if a date is your birthday

by Andra Jimenez

HTML

<h1>Assignment 1 - Checking if today's my birthday</h1>

CSS

h1{
    font-family; font-family: sans-serif;
    color:#395a96;
}

JavaScript

//This is assignment 1

function isThisMyBirthday(selectedDate) {
    var birthday = new Date("02-23-1987");
    var checkdate = new Date(selectedDate);

    if (birthday.getDate() == checkdate.getDate()  &&   birthday.getMonth() == checkdate.getMonth()){ 
        alert("today is your birthday");}
     
    else {
        alert("It is not your birthday");}
    } 

alert(isThisMyBirthday(new Date()));
      


//document.querySelector("h1").textContent = //IsThisMyBirthday();            
  
//document.getElementById("birthday").innerHTML = "The //text from the intro paragraph is " + IsThisMyBirthday();