Skip to content
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.

Simple weather only in farenheit ? #226

Closed
vimorozov opened this issue Mar 24, 2016 · 8 comments
Closed

Simple weather only in farenheit ? #226

vimorozov opened this issue Mar 24, 2016 · 8 comments

Comments

@vimorozov
Copy link

Hi, any idea why simple weather only display the weather in farenheit ?

@woosungchu
Copy link

Yahoo has made some changes to their API . So I guess that is temporary solution.

@biapar
Copy link

biapar commented Mar 25, 2016

+1

1 similar comment
@KibGim
Copy link

KibGim commented Mar 25, 2016

+1

@biapar
Copy link

biapar commented Mar 25, 2016

The yahoo api work now on public url.

@biapar
Copy link

biapar commented Mar 25, 2016

Simple workaround

Unit=c
temp = F temperature
function getMyAltTemp(unit, temp) { if(unit === 'c') { return Math.round((5.0/9.0)*(temp-32.0)); } else { return Math.round((9.0/5.0)*temp+32.0); } }

@maninderx
Copy link

Celsius also not displaying for my WOEID

@CesarCarrillo91
Copy link

As the bug is only displaying Farenheit, I came to this solution:

// Based on @biapar answer (y)
var getCelsius = function (temp) {
    return Math.round((5.0/9.0)*(temp-32.0));
};

var isFarenheitBug = weather.units.temp === "F";
if (isFarenheitBug) {
    weather.temp = getCelsius(parseInt(weather.temp));
    weather.units.temp = "C";
}

Hope its useful :)

@sleddogrob
Copy link

Celsius seems to be working with the exception of "wind chill" ( feels like ). I really hate asking but I don't suppose someone could point methe right direction for a work around for this? Been banging my head for a few days now on this one with no luck .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants