Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

No Celsius #17

Closed
andreweberle opened this issue Nov 10, 2016 · 2 comments
Closed

No Celsius #17

andreweberle opened this issue Nov 10, 2016 · 2 comments

Comments

@andreweberle
Copy link

Is there an option that allows you to use Celsius instead of Fahrenheit like the website?
I could use a regex and then convert it, however it there was more than one set of numbers in the Daily Summary, I could create issues.

@jcheng31
Copy link
Owner

Yep, definitely! All of the units of measurement supported by the API are supported here as well. Try GetWeatherDataAsync(<latitude>, <longitude>, Unit.CA)

The full breakdown of the various units of measurement is in RequestParameters.cs (reproduced here for convenience):

Unit.US: 
  /// US units of measurement.
  /// Summaries containing temperature or snow accumulation units have
  /// their values in degrees Fahrenheit or inches (respectively).
  /// Nearest storm distance: Miles
  /// Precipitation intensity: Inches per hour
  /// Precipitation accumulation: Inches
  /// Temperature: Fahrenheit
  /// Dew Point: Fahrenheit
  /// Wind Speed: Miles per hour
  /// Pressure: Millibars
  /// Visibility: Miles

Unit.SI:
  /// SI units of measurement.
  /// Summaries containing temperature or snow accumulation units have
  /// their values in degrees Celsius or centimeters (respectively).
  /// Nearest storm distance: Kilometers
  /// Precipitation intensity: Millimeters per hour
  /// Precipitation accumulation: Centimeters
  /// Temperature: Celsius
  /// Dew Point: Celsius
  /// Wind Speed: Meters per second
  /// Pressure: Hectopascals (equivalent to millibars)
  /// Visibility: Kilometers

Unit.CA:
  /// Canadian units of measurement. Same as SI, but kilometres per hour used for wind speed.
  /// Summaries containing temperature or snow accumulation units have
  /// their values in degrees Celsius or centimeters (respectively).
  /// Nearest storm distance: Kilometers
  /// Precipitation intensity: Millimeters per hour
  /// Precipitation accumulation: Centimeters
  /// Temperature: Celsius
  /// Dew Point: Celsius
  /// Wind Speed: Kilometers per hour
  /// Pressure: Hectopascals (equivalent to millibars)
  /// Visibility: Kilometers

Unit.UK:
  /// UK units of measurement. Same as SI, but miles per hour used for wind speed.
  /// Summaries containing temperature or snow accumulation units have
  /// their values in degrees Celsius or centimeters (respectively).
  /// Nearest storm distance: Kilometers
  /// Precipitation intensity: Millimeters per hour
  /// Precipitation accumulation: Centimeters
  /// Temperature: Celsius
  /// Dew Point: Celsius
  /// Wind Speed: Miles per hour
  /// Pressure: Hectopascals (equivalent to millibars)
  /// Visibility: Kilometers

Unit.Auto:
  /// Automatically choose units of measurement based on location.

@andreweberle
Copy link
Author

awesome! I overlooked this part, very nice indeed!

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

2 participants