I am just wondering how does the general public decide if they will use degree Celsius or Fahrenheit.
I have set my units to auto so that the temperature display will be according to location but I found out that displaying the degree Celsius or Fahrenheit symbol becomes tricky as when when retreiving units, I get uk2 rather than si or us.
how do you handle which type of temperature unit to display?
im using dark sky api.
I retrieve and show the temperature always at Fahrenheit first. Next to it I have a button that allows quick conversion between that and Celsius. I do think that is mandatory for the challenge, also.
I thought it was only US that uses Fahrenheit now. Why not show both?
Get the temperature in whatever unit you prefer and convert it using math when you need to. http://www.rapidtables.com/convert/temperature/how-fahrenheit-to-celsius.htm
Actually that is a very good idea. I can see why it will be useful to have both and makes the entire code much easier. With a little re-arrangement it will look good onscreen too.
At the moment, I am always showing Celsius just because I am British but if it is global app than it can show both