From 009782090d88c5bcdb9337fc5f869a6098ddeb0b Mon Sep 17 00:00:00 2001 From: kamalesh Date: Tue, 21 May 2024 23:27:21 +0530 Subject: [PATCH 1/4] Added Days Until Deadline Calculator --- .../Days-Until-Deadline-Calculator/index.html | 20 +++++++ .../Days-Until-Deadline-Calculator/script.js | 15 +++++ .../Days-Until-Deadline-Calculator/style.css | 55 +++++++++++++++++++ index.html | 14 +++++ 4 files changed, 104 insertions(+) create mode 100644 Calculators/Days-Until-Deadline-Calculator/index.html create mode 100644 Calculators/Days-Until-Deadline-Calculator/script.js create mode 100644 Calculators/Days-Until-Deadline-Calculator/style.css diff --git a/Calculators/Days-Until-Deadline-Calculator/index.html b/Calculators/Days-Until-Deadline-Calculator/index.html new file mode 100644 index 000000000..1a403fe06 --- /dev/null +++ b/Calculators/Days-Until-Deadline-Calculator/index.html @@ -0,0 +1,20 @@ + + + + + + Days Until Deadline Calculator + + + +
+

Days Until Deadline Calculator

+ + +

+ +

+
+ + + diff --git a/Calculators/Days-Until-Deadline-Calculator/script.js b/Calculators/Days-Until-Deadline-Calculator/script.js new file mode 100644 index 000000000..8331edf76 --- /dev/null +++ b/Calculators/Days-Until-Deadline-Calculator/script.js @@ -0,0 +1,15 @@ +function calculateDays() { + const deadlineInput = document.getElementById('deadline').value; + if (deadlineInput) { + const deadlineDate = new Date(deadlineInput); + const currentDate = new Date(); + + const timeDifference = deadlineDate - currentDate; + const daysRemaining = Math.ceil(timeDifference / (1000 * 60 * 60 * 24)); + + document.getElementById('result').innerText = + daysRemaining >= 0 ? `${daysRemaining} days remaining` : `The date has passed.`; + } else { + document.getElementById('result').innerText = 'Please select a date.'; + } +} diff --git a/Calculators/Days-Until-Deadline-Calculator/style.css b/Calculators/Days-Until-Deadline-Calculator/style.css new file mode 100644 index 000000000..37151b7f8 --- /dev/null +++ b/Calculators/Days-Until-Deadline-Calculator/style.css @@ -0,0 +1,55 @@ +body { + font-family: Arial, sans-serif; + background: linear-gradient(to right, #6a11cb, #2575fc); + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} + +.container { + background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */ + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + text-align: center; + color: black; + background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cg fill="none" stroke="%23999" stroke-width="1"%3E%3Cpath d="M0 50 L50 0 L100 50 L50 100 Z"/%3E%3Cpath d="M50 0 L50 100"/%3E%3Cpath d="M0 50 L100 50"/%3E%3C/g%3E%3C/svg%3E'); + background-size: 40px 40px; + background-repeat: repeat; +} + +h1 { + margin-bottom: 20px; +} + +label { + font-size: 18px; +} + +input[type="date"] { + padding: 10px; + margin: 10px 0; + font-size: 16px; +} + +button { + padding: 10px 20px; + font-size: 16px; + background-color: #007bff; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; +} + +button:hover { + background-color: #0056b3; +} + +#result { + margin-top: 20px; + font-size: 20px; + font-weight: bold; +} diff --git a/index.html b/index.html index aab0626e6..188e52a02 100644 --- a/index.html +++ b/index.html @@ -622,6 +622,20 @@

Calculates the day for the specified date.

+
+
+

Days Until Deadline Calculator

+

Calculate the Number of Days Remaining Until a Selected Date.

+ +
+

Definite Integral Calculator

From b0f6bf12f6c9f15dca99d01e803d85c3e7b24ebb Mon Sep 17 00:00:00 2001 From: kamalesh Date: Fri, 24 May 2024 11:51:30 +0530 Subject: [PATCH 2/4] Added README file to Days-Until-Deadline-Calculator folder --- .../Days-Until-Deadline-Calculator/README.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Calculators/Days-Until-Deadline-Calculator/README.md diff --git a/Calculators/Days-Until-Deadline-Calculator/README.md b/Calculators/Days-Until-Deadline-Calculator/README.md new file mode 100644 index 000000000..068f2ec98 --- /dev/null +++ b/Calculators/Days-Until-Deadline-Calculator/README.md @@ -0,0 +1,21 @@ +#

Days Until Deadline Calculator

+ +## Description :- + +This "Days Until Deadline Calculator" is a simple tool which allows users to select a date and calculates the number of days remaining until that date. + +## Tech Stacks :- + +- HTML +- CSS +- JavaScript + +## Screenshots :- + +![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/662042f9-431e-4070-b78c-b9c8846de5cb) +After Clicking the Try Now, +![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/244b6177-71e8-4594-8097-7ece1b9f875f) +To check how the date is selected, +![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/63ed3da9-e0e7-46c3-b77b-7fab7340363a) +Sample Output, +![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/8b07ad6e-8db4-4e22-8989-2bc107c16691) From 57bb770d00d0ccc49bb38b2c32c9f751cb1f60b5 Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Fri, 24 May 2024 12:15:36 +0530 Subject: [PATCH 3/4] Update README.md --- Calculators/Days-Until-Deadline-Calculator/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Calculators/Days-Until-Deadline-Calculator/README.md b/Calculators/Days-Until-Deadline-Calculator/README.md index 068f2ec98..ba1b93224 100644 --- a/Calculators/Days-Until-Deadline-Calculator/README.md +++ b/Calculators/Days-Until-Deadline-Calculator/README.md @@ -2,7 +2,7 @@ ## Description :- -This "Days Until Deadline Calculator" is a simple tool which allows users to select a date and calculates the number of days remaining until that date. +This calculator is a simple tool that allows users to select a date and calculate the number of days remaining until that date. ## Tech Stacks :- @@ -13,9 +13,12 @@ This "Days Until Deadline Calculator" is a simple tool which allows users to sel ## Screenshots :- ![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/662042f9-431e-4070-b78c-b9c8846de5cb) -After Clicking the Try Now, + +### After Clicking the Try Now, ![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/244b6177-71e8-4594-8097-7ece1b9f875f) -To check how the date is selected, + +### To check how the date is selected, ![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/63ed3da9-e0e7-46c3-b77b-7fab7340363a) -Sample Output, + +### Sample Output, ![image](https://github.com/Rakesh9100/CalcDiverse/assets/163159351/8b07ad6e-8db4-4e22-8989-2bc107c16691) From 781c37d52a1abaae5c65d72c2be10c6a26c6c016 Mon Sep 17 00:00:00 2001 From: Rakesh Roshan Date: Fri, 24 May 2024 12:18:34 +0530 Subject: [PATCH 4/4] Update index.html --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 188e52a02..d009ff8b3 100644 --- a/index.html +++ b/index.html @@ -625,12 +625,12 @@

Calculates the day for the specified date.

Days Until Deadline Calculator

-

Calculate the Number of Days Remaining Until a Selected Date.

+

Calculates the number of days remaining until a selected date.

@@ -2007,4 +2007,4 @@

Calculates the linear density of the yarn from unit system to another.

- \ No newline at end of file +