Create the most imaginative and festive holiday wish using your software engineering skills! Whether it's a mock website, a cool automation script, or any other tech marvel, we want to see your creativity shine through your code.
- HTML
- CSS
- JavaScript
- JS Timer
This project features a JavaScript countdown timer set to expire on January 1st, 2024, at midnight (00:00:00). The code utilizes JavaScript to calculate and display the remaining time in days, hours, minutes, and seconds.
- The countdown date is set to January 1st, 2024, 00:00:00 using the following constant:
const countdownDate = new Date("2024-01-01T00:00:00").getTime();
- The
updateCountdown
built-in Javascript function calculates the time remaining in days, hours, minutes, and seconds by comparing the current time with the countdown date. The results are then displayed in an HTML element with the idtimer
:
function updateCountdown() {
// ... (code for calculating days, hours, minutes, and seconds)
document.getElementById(
"timer"
).innerHTML = `${days}D: ${hours}H: ${minutes}M: ${seconds}S`;
}
- Finally, the
setInterval
function is calls theupdateCountdown
function every second, ensuring that the countdown is dynamically updated:
setInterval(updateCountdown, 1000);
- Fork the Repository:
Fork the repository to your own GitHub account by clicking the "Fork" button at the top of this page.
- Clone the Repository:
Clone the forked repository to your local machine using the following command:
git clone https://github.com/octocatblain/new-years-countdown.git
- Create a New Branch:
Create a new branch for your contribution using a descriptive branch name.
css: git checkout -b <your-feature-branch>
- Make Changes:
Implement your changes or add new features.
- Test Changes:
Ensure that your changes work as intended and do not introduce any errors.
- Commit Changes:
Commit your changes with a clear and concise commit message. git commit -m "Your descriptive commit message here"
- Push Changes:
Push your changes to your forked repository on GitHub.
git push origin your-feature-branch
- Create a Pull Request (PR):
-
Go to the original repository on GitHub.
-
Click on the "New Pull Request" button. Provide a meaningful title and description for your pull request.
-
Submit the pull request.
- Celebrate Your Contribution😇
Once your pull request is accepted and merged, your contribution will be part of something big😆.
🍀Thank you for your valuable contribution!