Class Weather


  • public final class Weather
    extends java.lang.Object
    • Field Detail

      • PROB_OF_PRECIPITATION_ITEM_COUNT

        public static final int PROB_OF_PRECIPITATION_ITEM_COUNT
        See Also:
        Constant Field Values
      • SQL_COMMAND_QUERYTIMECOLUMN

        public static final java.lang.String[] SQL_COMMAND_QUERYTIMECOLUMN
    • Constructor Detail

      • Weather

        public Weather()
    • Method Detail

      • getCurrentWeatherInfo

        public CurrentWeatherInfo getCurrentWeatherInfo​(Context context)
      • sanitizeDatabase

        public static void sanitizeDatabase​(Context context)
      • usePreciseIsDaytime

        public static boolean usePreciseIsDaytime​(Weather.WeatherLocation weatherLocation)
        Returns if a precise calculation of day/night time with the Astronomy class makes sense. It makes sense between a latutide of -65° to +65°, but not further south or north.
        Parameters:
        weatherLocation -
        Returns:
      • getSunsetInUTC

        public static long getSunsetInUTC​(Astronomy.Riseset riseset,
                                          long time)
      • getSunriseInUTC

        public static long getSunriseInUTC​(Astronomy.Riseset riseset,
                                           long time)
      • getCivilTwilightMorning

        public static long getCivilTwilightMorning​(Astronomy.Riseset riseset,
                                                   long time)
      • getCivilTwilightEvening

        public static long getCivilTwilightEvening​(Astronomy.Riseset riseset,
                                                   long time)
      • isSunriseInIntervalUTC

        public static boolean isSunriseInIntervalUTC​(Astronomy.Riseset riseset,
                                                     long start,
                                                     long stop)
      • isSunsetInIntervalUTC

        public static boolean isSunsetInIntervalUTC​(Astronomy.Riseset riseset,
                                                    long start,
                                                    long stop)
      • toHourMinuteString

        public static java.lang.String toHourMinuteString​(long time)
      • toFullDateTimeString

        public static java.lang.String toFullDateTimeString​(long time)
      • getWindUnitString

        public static java.lang.String getWindUnitString​(int type)
      • getWindString

        public static java.lang.String getWindString​(Context context,
                                                     CurrentWeatherInfo weatherCard)