}
private GeocodingData getGeocodingData(final double latitude, final double longitude) throws IOException {
- final Geocoder geocoder = new Geocoder(
- WeatherInformationMapActivity.this, Locale.getDefault());
+ final Geocoder geocoder = new Geocoder(WeatherInformationMapActivity.this, Locale.US);
final List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);
if (addresses == null) {
public void updateCurrentWeatherData(final CurrentWeatherData currentWeatherData) {
- final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale
- .getDefault());
+ final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);
tempFormatter.applyPattern("#####.#####");
- final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss Z",
- Locale.getDefault());
+ final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss Z", Locale.US);
final double tempUnits = this.mIsFahrenheit ? 0 : 273.15;
final String symbol = this.mIsFahrenheit ? "ºF" : "ºC";
R.layout.weather_main_entry_list);
- final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale.getDefault());
+ final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);
tempFormatter.applyPattern("#####.##");
- final SimpleDateFormat dayNameFormatter = new SimpleDateFormat("EEE", Locale.getDefault());
- final SimpleDateFormat monthAndDayNumberormatter = new SimpleDateFormat("MMM d",
- Locale.getDefault());
+ final SimpleDateFormat dayNameFormatter = new SimpleDateFormat("EEE", Locale.US);
+ final SimpleDateFormat monthAndDayNumberormatter = new SimpleDateFormat("MMM d", Locale.US);
final double tempUnits = this.mIsFahrenheit ? 0 : 273.15;
final String symbol = this.mIsFahrenheit ? "ºF" : "ºC";
public void updateForecastWeatherData(final ForecastWeatherData forecastWeatherData,
final int chosenDay) {
- final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale
- .getDefault());
+ final DecimalFormat tempFormatter = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US);
tempFormatter.applyPattern("#####.#####");
final double tempUnits = this.mIsFahrenheit ? 0 : 273.15;
final String symbol = this.mIsFahrenheit ? "ºF" : "ºC";
final de.example.exampletdd.model.forecastweather.List forecast = forecastWeatherData
.getList().get((chosenDay));
- final SimpleDateFormat dayFormatter = new SimpleDateFormat("EEEE - MMM d", Locale.getDefault());
+ final SimpleDateFormat dayFormatter = new SimpleDateFormat("EEEE - MMM d", Locale.US);
final Calendar calendar = Calendar.getInstance();
final Long forecastUNIXDate = (Long) forecast.getDt();
calendar.setTimeInMillis(forecastUNIXDate * 1000L);
public String createURIAPIForecastWeather(final String urlAPI, final String APIVersion,
final double latitude, final double longitude, final String resultsNumber) {
- final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.ENGLISH);
+ final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.US);
final Object[] values = new Object[4];
values[0] = APIVersion;
values[1] = latitude;
public String createURIAPITodayWeather(final String urlAPI, final String APIVersion,
final double latitude, final double longitude) {
- final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.ENGLISH);
+ final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.US);
final Object[] values = new Object[3];
values[0] = APIVersion;
values[1] = latitude;
public String createURIAPIicon(final String icon, final String urlAPI) {
- final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.ENGLISH);
+ final MessageFormat formatURIAPI = new MessageFormat(urlAPI, Locale.US);
final Object[] values = new Object[1];
values[0] = icon;