Made the temperature value integer.
This commit is contained in:
@@ -35,9 +35,9 @@
|
|||||||
"disableDate": false,
|
"disableDate": false,
|
||||||
"disableSearchBar": false,
|
"disableSearchBar": false,
|
||||||
"disable24Hour": false,
|
"disable24Hour": false,
|
||||||
"disableWeather": true,
|
"disableWeather": false,
|
||||||
"weatherConf": {
|
"weatherConf": {
|
||||||
"location": "Pune India",
|
"location": "Pune India",
|
||||||
"unit": "fah"
|
"unit": "cel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ function updateTimeHook() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getFahrenheit(inCelcius) {
|
function getFahrenheit(inCelcius) {
|
||||||
return ((inCelcius * 9 / 5) + 32).toFixed(2)
|
return Math.floor((inCelcius * 9 / 5) + 32)
|
||||||
}
|
}
|
||||||
|
|
||||||
function indexUppercase(unformatted) {
|
function indexUppercase(unformatted) {
|
||||||
@@ -148,7 +148,7 @@ function updateWeather(weatherConfig) {
|
|||||||
fetch(fetchUrl)
|
fetch(fetchUrl)
|
||||||
.then(response => {return response.json()})
|
.then(response => {return response.json()})
|
||||||
.then(jsonData => {
|
.then(jsonData => {
|
||||||
temp = jsonData["main"]["temp"]
|
temp = Math.floor(jsonData["main"]["temp"])
|
||||||
weatherType = jsonData["weather"][0]["main"]
|
weatherType = jsonData["weather"][0]["main"]
|
||||||
console.log(temp, weatherType)
|
console.log(temp, weatherType)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user