diff --git a/index.html b/index.html
index c6a13f2..8184cee 100644
--- a/index.html
+++ b/index.html
@@ -51,7 +51,9 @@
diff --git a/script.js b/script.js
index d5c7d73..e162547 100644
--- a/script.js
+++ b/script.js
@@ -1,5 +1,6 @@
// get real-time and date
-function formatDate(currentDate) {
+function formatDate(timestamp) {
+ let currentDate = new Date(timestamp);
let hour = currentDate.getHours();
hour < 10 ? (hour = `0${hour}`) : false;
let minutes = currentDate.getMinutes();
@@ -16,13 +17,9 @@ function formatDate(currentDate) {
];
let day = days[currentDate.getDay()];
- let fullDate = `${day}, ${hour}:${minutes}`;
- let fullCurrentDate = (document.querySelector(".current-date").innerHTML =
- fullDate);
+ return `${day} ${hour}:${minutes}`;
}
-formatDate(new Date());
-
// get temperature by searching for a city
function showTemp(response) {
let city = (document.querySelector(
@@ -40,6 +37,7 @@ function showTemp(response) {
let wind = (document.querySelector(".wind").innerHTML = `${Math.round(
response.data.wind.speed
)} km/h`);
+ let date = document.querySelector("#date").innerHTML = formatDate(response.data.dt * 1000);
}
function search(city) {
diff --git a/style.css b/style.css
index 1453192..53ce7cf 100644
--- a/style.css
+++ b/style.css
@@ -46,6 +46,18 @@ h2 {
font-size: 8.5rem;
}
+ul {
+ margin: 0;
+ padding: 0;
+}
+
+li {
+ list-style: none;
+ font-weight: 100;
+ line-height: 19px;
+ font-size: 16px;
+}
+
img {
height: 70px;
width: 70px;
@@ -83,6 +95,7 @@ a {
text-decoration: none;
color: inherit;
}
+
.btn {
font-size: 1.6rem;
}