From 73ec55ac4c916cc73635ba9698efce9c546af512 Mon Sep 17 00:00:00 2001 From: deepjyoti30 Date: Fri, 15 May 2020 23:15:58 +0530 Subject: [PATCH] Made the temperature value integer. --- config.json | 4 ++-- js/main.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index cb9ddbc..1e69232 100644 --- a/config.json +++ b/config.json @@ -35,9 +35,9 @@ "disableDate": false, "disableSearchBar": false, "disable24Hour": false, - "disableWeather": true, + "disableWeather": false, "weatherConf": { "location": "Pune India", - "unit": "fah" + "unit": "cel" } } diff --git a/js/main.js b/js/main.js index 84c7fea..9bc4796 100644 --- a/js/main.js +++ b/js/main.js @@ -123,7 +123,7 @@ function updateTimeHook() { } function getFahrenheit(inCelcius) { - return ((inCelcius * 9 / 5) + 32).toFixed(2) + return Math.floor((inCelcius * 9 / 5) + 32) } function indexUppercase(unformatted) { @@ -148,7 +148,7 @@ function updateWeather(weatherConfig) { fetch(fetchUrl) .then(response => {return response.json()}) .then(jsonData => { - temp = jsonData["main"]["temp"] + temp = Math.floor(jsonData["main"]["temp"]) weatherType = jsonData["weather"][0]["main"] console.log(temp, weatherType)